Industrial control information asset safety detection method and system based on fully homomorphic encryption and CRT
By using fully homomorphic encryption and Chinese residual theorem methods in industrial control systems, a distributed secure network is built to encrypt and machine learning traffic characteristic data, which solves the problems of low efficiency of device information management and low privacy calculation accuracy, and realizes the Efficient and secure asset detection and abnormal traffic judgment.
Patent Information
- Application Number
- CN202411034078.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-07-30
- Publication Date
- 2024-11-01
AI Technical Summary
In industrial control systems, equipment information management is low efficiency, difficult to prevent tampering, and difficult to safely calculate large amounts of traffic characteristic data. The existing privacy calculation accuracy is low and multiple machine learning iterations cannot be carried out.
Using the industrial control information asset security detection method based on all-homomorphic encryption and China's residual theorem, the traffic characteristic data is encrypted by building a distributed security network, using all-homomorphic encryption technology, and machine learning algorithms are executed in an encrypted environment, and the utilization area is Blockchain technology ensures data immutability and privacy.
Improve the management efficiency of asset detection information, realize the security training and efficient detection of traffic characteristic data, ensure the privacy and integrity of data, support multiple iterations of machine learning tasks, and improve the accuracy and operation of abnormal traffic judgment. Dimensional response speed.
Smart Images

Figure CN118890188A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of industrial control systems, and in particular to a method and system for detecting industrial control information asset security based on fully homomorphic encryption and Chinese Remainder Theorem (CRT). Background Art
[0002] As network asset detection technology continues to develop in the field of information and communications, enterprises and organizations are faced with the challenge of managing more and more devices. The differences in device types and regions of each manufacturer make the management of device detection information complex and confusing. Managers need to deal with a large amount of information and data generated by heterogeneous devices, and these data often come from different manufacturers with different formats and standards. Then, in order to evade supervision or get away with it, some manufacturers may tamper with asset information that does not meet the standards, causing the accuracy of device information to be questioned, which may lead to device security issues. In addition, each manufacturer stores a large amount of traffic feature data, but not every manufacturer has enough computing power to perform machine learning calculations on this data to explore the value of the data. Therefore, sometimes outsourcing computing is needed, and many traffic feature data are private data, which may cause privacy leakage when outsourcing computing.
[0003] Therefore, managers need to use advanced network asset detection technology and strict data management processes to ensure the accuracy and completeness of device information in order to cope with increasingly complex network environments and device management challenges. They also need a "data available but invisible" technology to ensure that traffic feature data can be used safely. Summary of the invention
[0004] The purpose of this section is to summarize some aspects of embodiments of the present invention and briefly introduce some preferred embodiments. Some simplifications or omissions may be made in this section and the specification abstract and the invention title of this application to avoid blurring the purpose of this section, the specification abstract and the invention title, and such simplifications or omissions cannot be used to limit the scope of the present invention.
[0005] In view of the above existing problems, the present invention is proposed.
[0006] Therefore, the present invention provides an industrial control information asset security detection method and system based on fully homomorphic encryption and CRT to solve the problems of low efficiency of detection equipment information management, difficulty in preventing tampering, difficulty in securely calculating large amounts of traffic feature data, low accuracy of existing privacy calculations, and inability to perform multiple machine learning iterations.
[0007] In order to solve the above technical problems, the present invention provides the following technical solutions:
[0008] In a first aspect, the present invention provides an industrial control information asset security detection method based on fully homomorphic encryption and CRT, comprising:
[0009] Based on industrial control equipment assets, a distributed security network is built, in which the master node establishes the main blockchain and each sub-node establishes its own sub-blockchain;
[0010] Based on a distributed security network, the master node registers and reviews information for each sub-node and cloud server, assigns a unique ID to it, and generates encryption parameters;
[0011] Each sub-node uses the user key generation algorithm and encryption parameters to generate public keys, private keys and auxiliary calculation keys;
[0012] The sub-node uses the public key to encrypt the traffic characteristic data through fully homomorphic encryption technology, and sends the encrypted traffic characteristic data to the master node;
[0013] The cloud server uses the ciphertext and auxiliary computing key to execute the machine learning algorithm and obtain the model parameter ciphertext;
[0014] After receiving the model parameter matrix ciphertext, the model parameter matrix ciphertext is decrypted and decoded using the private key to obtain the model parameters;
[0015] Detect device assets at each node, quantify the detection information and input it into the model parameters to determine whether it is abnormal traffic;
[0016] Based on the abnormal traffic judgment results and combined with operation and maintenance decisions, industrial control information asset detection is completed.
[0017] As a preferred solution of the industrial control information asset security detection method based on fully homomorphic encryption and CRT described in the present invention, wherein: the encryption of traffic feature data by fully homomorphic encryption technology includes: the master node registers and reviews relevant information for each sub-node and cloud server, and assigns a unique identity number ID to generate encryption parameters;
[0018] The generating of encryption parameters comprises the following steps:
[0019] Select a power of 2 N as the maximum degree of the ciphertext polynomial;
[0020] Choose a particular modulus p;
[0021] According to the expected number of logistic regression multiplications L, calculate the ciphertext modulus Q = p L , while ensuring that Q and N meet the safety level parameter λ, that is
[0022] Construct a polynomial quotient ring
[0023] Choose a private key distribution X in the polynomial ring R s , introduce an error distribution X e and a random distribution X r , as a randomizing element in the encryption process;
[0024] Summarize and generate a common parameter set Params = {Q, X s ,R,X e ,X r ,p} and send it to each branch node.
[0025] As a preferred solution of the industrial control information asset security detection method based on fully homomorphic encryption and CRT described in the present invention, wherein: the use of the user key generation algorithm and encryption parameters to generate the public key, private key and auxiliary calculation key required by the fully homomorphic encryption technology includes:
[0026] The nodes are randomly and uniformly sampled from a discrete Gaussian distribution on the polynomial quotient ring R to obtain the distribution X related to the private key. s , random distribution X r , error distribution X e ;
[0027] In private key distribution X s Select s from the random distribution X to form the private key. r Randomly select r as an integer and in the error distribution X e Select e and e′ as error distribution polynomials;
[0028] Randomly and uniformly select polynomial a from R to form a fully homomorphic public key, and a′ to form an auxiliary calculation key evk;
[0029] Get the public key pk, private key sk and auxiliary calculation key evk;
[0030] The public key pk is expressed as:
[0031] pk=(b,a)
[0032] b=-as+e mod Q
[0033] The private key sk is expressed as:
[0034] sk=(1,s)
[0035] The auxiliary calculation key evk is expressed as:
[0036] evk=(b′,a′)
[0037] b′=-a′s+e′+bs 2 mod(pQ).
[0038] As a preferred solution of the industrial control information asset security detection method based on fully homomorphic encryption and CRT described in the present invention, wherein: the traffic feature data is encrypted by fully homomorphic encryption technology, and the encrypted traffic feature data is sent to the master node, including:
[0039] Prepare various matrices required for model training in different nodes, including the initial model parameter matrix B (0) n×(m+1) , initial velocity matrix V (0) n×(m+1) , traffic characteristic data matrix H n×(m+1) And the label matrix Y n×(m+1) , these matrices together constitute the data set Z n×(m+1) ;
[0040] Mapping π via inverse natural projection -1 Expand the vector dimension by calculating pπ -1 The integer part of (z) is mapped into the target polynomial ring using the regular embedding function σ;
[0041] Using the fully homomorphic encryption algorithm, based on the generated public key pk, the encoded plaintext polynomial m = {m H ,m β ,mv,m Y} is converted to the corresponding ciphertext ct = {ct H ,ct β ,ct v ,ct Y};
[0042] After encryption is completed, the sub-node sends the ciphertext form of all matrices to the main node. After the main node verifies and confirms that it is correct, it forwards the encrypted data to the cloud server.
[0043] As a preferred solution of the industrial control information asset security detection method based on fully homomorphic encryption and CRT described in the present invention, wherein: the cloud server uses the ciphertext and the auxiliary calculation key to execute the machine learning algorithm, and the model parameter ciphertext obtained includes:
[0044] Set homomorphic multiplication and addition rules in a fully homomorphic encryption environment;
[0045] Use the encrypted feature data matrix H to perform homomorphic multiplication with the initial velocity matrix V, and perform linearization and scaling through the auxiliary calculation key;
[0046] The inner product of the feature and velocity matrices is calculated through ciphertext rotation and homomorphic addition operations;
[0047] Through multiple homomorphic multiplication and addition calculations, the output matrix of the approximate Sigmoid function is obtained;
[0048] The gradient of the loss function is calculated through ciphertext operation, and the Nesterov gradient descent method is applied. The model parameter β is updated and the speed value is adjusted by combining the learning rate a and the speed value v.
[0049] Through multiple rounds of iterations, the model parameter ciphertext B and speed ciphertext V are updated in each iteration until the predetermined number of iterations k is reached, and the update pace is dynamically adjusted using the decay rate v;
[0050] Bootstrapping technology is introduced to obtain the optimized model parameter ciphertext through model expansion, decoding, model extraction and encoding.
[0051] As a preferred solution of the industrial control information asset security detection method based on fully homomorphic encryption and CRT described in the present invention, after receiving the model parameter matrix ciphertext, the model parameter matrix ciphertext is decrypted and decoded using a private key to obtain the model parameters including:
[0052] The node system administrator receives the ciphertext B of the model parameters after multiple iterations of optimization transmitted from the cloud server. (k) n×(m+1) * , use the pre-held private key sk to decrypt the ciphertext;
[0053] The plaintext polynomial obtained after decryption Processed by decoding algorithm Decode;
[0054] Will The input decoding algorithm Decode uses the regular embedding σ(·) to obtain Divide by the scaling factor p to get π -1 (z);
[0055] Use the natural projection mapping π to reduce its dimension to N / 2 and output the model parameter vector z B =π(π -1 (z))=[β0 (k) β1 (k) ,...,β m (k) ]
[0056] The nodes are divided according to the model parameter plaintext vector [β0 (k) β1 (k) ,…,β m (k) ], and get the logistic regression model formula;
[0057] The sub-node uses a test data set to test the accuracy of the model. The test data set consists of traffic feature parameters and corresponding labels in the local database of the sub-node;
[0058] The sub-nodes will calculate the traffic characteristic parameters fea in each test data set i Substitute into the logistic regression model formula, calculate the result M, and substitute M into the prediction value calculation formula;
[0059] If the corresponding prediction value is 0, it means that the traffic packet is not abnormal traffic. If the corresponding prediction value is 1, it means that the traffic packet is abnormal traffic.
[0060] The sub-nodes use the public key of the master node to encrypt the model parameters and send the ciphertext to the master node. The system administrator of the master node uses the private key to decrypt the model parameters and backs them up for storage.
[0061] The logistic regression model formula is expressed as:
[0062]
[0063] The predicted value calculation formula is expressed as:
[0064]
[0065] Here, e represents the natural logarithm.
[0066] As a preferred solution of the industrial control information asset security detection method based on fully homomorphic encryption and CRT described in the present invention, the operation and maintenance decision includes:
[0067] Input the quantified protocol information into the model formula f(M) to determine whether the current traffic is abnormal traffic;
[0068] If the current traffic matches the corresponding asset in the feature library, it is not abnormal traffic and the detection of the next asset will be continued;
[0069] If the corresponding asset cannot be matched and the traffic is abnormal, an alarm will be issued and it will be determined whether it is a new asset device.
[0070] If the current traffic is abnormal and is not a new asset device, block its source IP address;
[0071] If the corresponding asset cannot be matched and it is a new asset device, the asset feature information will be stored in the feature library and mapped to the blockchain.
[0072] In a second aspect, the present invention provides an industrial control information asset security detection system based on fully homomorphic encryption and CRT, comprising:
[0073] The construction module is used to build a distributed security network based on industrial control equipment assets, in which the master node establishes the main blockchain and each sub-node establishes its own sub-blockchain;
[0074] Audit module, which is used to register and audit information for each sub-node and cloud server based on a distributed security network, assign a unique identity number ID to them, and generate encryption parameters;
[0075] The generation module is used by each sub-node to generate public keys, private keys and auxiliary calculation keys using user key generation algorithms and encryption parameters;
[0076] An encryption module is used for the sub-nodes to encrypt the traffic characteristic data using the public key through the fully homomorphic encryption technology, and send the encrypted traffic characteristic data to the master node;
[0077] A computing module, used for the cloud server to execute the machine learning algorithm using the ciphertext and the auxiliary computing key to obtain the ciphertext of the model parameters;
[0078] A decryption module is used to decrypt and decode the ciphertext of the model parameter matrix using a private key to obtain the model parameters after receiving the ciphertext of the model parameter matrix;
[0079] The input module is used to detect device assets at different nodes, quantify the detection information and input it into the model parameters to determine whether it is abnormal traffic;
[0080] The decision-making module is used to complete industrial control information asset detection based on abnormal traffic judgment results and combined with operation and maintenance decisions.
[0081] In a third aspect, the present invention provides a computing device, comprising:
[0082] Memory, used to store programs;
[0083] A processor is used to execute the computer executable instructions, which, when executed by the processor, implement the steps of the industrial control information asset security detection method based on fully homomorphic encryption and CRT.
[0084] In a fourth aspect, the present invention provides a computer-readable storage medium, comprising: when the program is executed by a processor, the steps of implementing the industrial control information asset security detection method based on fully homomorphic encryption and CRT.
[0085] Beneficial effects of the present invention: The present invention uses the Chinese remainder theorem to map detection information and uses blockchain technology to record fingerprint information, which is beneficial to improving the management efficiency of asset detection information. At the same time, the fully homomorphic encryption algorithm and machine learning algorithm are used to safely train traffic feature data. The training results can be used to more efficiently perform asset detection. BRIEF DESCRIPTION OF THE DRAWINGS
[0086] In order to more clearly illustrate the technical solutions of the embodiments of the present invention, the following briefly introduces the drawings required for describing the embodiments. Obviously, the drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without creative labor. Among them:
[0087] Figure 1 A basic flow chart of a method and system for detecting industrial control information assets based on fully homomorphic encryption and CRT according to an embodiment of the present invention;
[0088] Figure 2 A flowchart of the overall solution of a method and system for industrial control information asset security detection based on fully homomorphic encryption and CRT provided by one embodiment of the present invention;
[0089] Figure 3 An InnerProduct algorithm diagram of an industrial control information asset security detection method and system based on fully homomorphic encryption and CRT provided in one embodiment of the present invention;
[0090] Figure 4 A PolySigmoid algorithm diagram of an industrial control information asset security detection method and system based on fully homomorphic encryption and CRT provided in one embodiment of the present invention;
[0091] Figure 5 An FHE-Logistic algorithm diagram of an industrial control information asset security detection method and system based on fully homomorphic encryption and CRT provided in one embodiment of the present invention;
[0092] Figure 6 A flow characteristic data privacy calculation step diagram of an industrial control information asset security detection method and system based on fully homomorphic encryption and CRT provided in one embodiment of the present invention;
[0093] Figure 7 An asset mapping contract SC calculation graph of an industrial control information asset security detection method and system based on fully homomorphic encryption and CRT provided in one embodiment of the present invention;
[0094] Figure 8 A detection mapping topology diagram based on CRT of a method and system for detecting industrial control information assets based on fully homomorphic encryption and CRT provided in one embodiment of the present invention;
[0095] Fig. 9 A blockchain-based detection record tracing diagram of an industrial control information asset security detection method and system based on fully homomorphic encryption and CRT is provided as one embodiment of the present invention. DETAILED DESCRIPTION
[0096] In order to make the above-mentioned purposes, features and advantages of the present invention more obvious and easy to understand, the specific implementation methods of the present invention are described in detail below in conjunction with the drawings of the specification. Obviously, the described embodiments are part of the embodiments of the present invention, but not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary persons in the art without creative work should fall within the scope of protection of the present invention.
[0097] In the following description, many specific details are set forth to facilitate a full understanding of the present invention, but the present invention may also be implemented in other ways different from those described herein, and those skilled in the art may make similar generalizations without violating the connotation of the present invention. Therefore, the present invention is not limited to the specific embodiments disclosed below.
[0098] Secondly, the term "one embodiment" or "embodiment" as used herein refers to a specific feature, structure, or characteristic that may be included in at least one implementation of the present invention. The term "in one embodiment" that appears in different places in this specification does not necessarily refer to the same embodiment, nor does it refer to a separate or selective embodiment that is mutually exclusive with other embodiments.
[0099] The present invention is described in detail with reference to schematic diagrams. When describing the embodiments of the present invention, for the sake of convenience, the cross-sectional diagrams showing the device structure will not be partially enlarged according to the general scale, and the schematic diagrams are only examples, which should not limit the scope of protection of the present invention. In addition, in actual production, the three-dimensional dimensions of length, width and depth should be included.
[0100] At the same time, in the description of the present invention, it should be noted that the directions or positional relationships indicated by the terms "upper, lower, inner and outer" are based on the directions or positional relationships shown in the drawings, and are only for the convenience of describing the present invention and simplifying the description, rather than indicating or implying that the device or element referred to must have a specific direction, be constructed and operated in a specific direction, and therefore cannot be understood as limiting the present invention. In addition, the terms "first, second or third" are only used for descriptive purposes and cannot be understood as indicating or implying relative importance.
[0101] In the present invention, unless otherwise clearly specified and limited, the terms "install, connect, connect" should be understood in a broad sense, for example: it can be a fixed connection, a detachable connection or an integral connection; it can also be a mechanical connection, an electrical connection or a direct connection, or it can be indirectly connected through an intermediate medium, or it can be the internal communication of two components. For ordinary technicians in this field, the specific meanings of the above terms in the present invention can be understood according to specific circumstances.
[0102] Example 1
[0103] Reference Figure 1-9, is an embodiment of the present invention, which provides an industrial control information asset security detection method based on fully homomorphic encryption and CRT, such as Figure 1 , as shown in 2, comprising the following steps:
[0104] S1: Based on industrial control equipment assets, a distributed security network is built, in which the master node establishes the main blockchain and each sub-node establishes its own sub-blockchain;
[0105] In the embodiment of the present application, the master node builds the main blockchain, which is a consortium chain. Both the master node and the sub-node can view the information in the consortium chain, but only the master node can record transactions in the consortium chain; each sub-node has a sub-blockchain, each sub-blockchain is a consortium chain, the content of the sub-blockchain is accessed by the sub-node and the master node, and each sub-node cannot access the blockchain of other sub-nodes. The sub-blockchain is used to record the asset library update process of each sub-node, and the main blockchain records the update process of all sub-blockchains. The sub-nodes detect the equipment assets of the area they are responsible for and send the detection results to the master node.
[0106] S2: Based on the distributed security network, the master node registers and reviews information for each sub-node and cloud server, assigns a unique identity number ID to it, and generates encryption parameters;
[0107] In the embodiment of the present application, the system administrator of the master node registers and reviews the relevant information for each sub-node and cloud server, assigns a unique identity number ID to each sub-node and cloud server, and stores the registration information in the local database. s ,R,X e ,X r ,p}, input the security level parameter λ, and obtain the public parameter Params.
[0108] Specifically, the public parameter Params is generated as follows:
[0109] The system administrator selects a power of 2 N as the degree of the ciphertext polynomial, and selects a special modulus p for homomorphic multiplication rescaling. To ensure that the medical data ciphertext has enough modulus, an integer L is selected that is greater than the number of logistic regression multiplication calculations, and the ciphertext modulus Q = p is set. L , while ensuring that Q and N meet the safety level parameter λ, that is Thus we get a polynomial quotient ring
[0110] The system administrator selects a private key distribution X from the polynomial R s , an error distribution X e , a random distribution X rUsed for fully homomorphic encryption, the system administrator finally sets the public parameters Params = {Q, X s ,R,X e ,X r ,p}, and sent to each branch node.
[0111] S3: Each sub-node uses the user key generation algorithm and encryption parameters to generate public keys, private keys and auxiliary calculation keys;
[0112] In an embodiment of the present application, the system administrator of each sub-node calls the user key generation algorithm KeyGen(Params)→{sk,pk,evk}, inputs Params, and obtains a fully homomorphic public-private key pair (pk,sk) and an auxiliary calculation key evk.
[0113] The specific key generation steps are as follows: the nodes are randomly and uniformly sampled from a discrete Gaussian distribution on the polynomial quotient ring R to obtain the distribution X related to the private key. s , random distribution X r , error distribution X e ;
[0114] In the distribution of private key related X s Select s from the random distribution X to form the private key. r Randomly select r as an integer and in the error distribution X e Select e and e′ as error distribution polynomials, randomly and uniformly select polynomial a from R to form a fully homomorphic public key, and a′ to form an auxiliary calculation key evk;
[0115] The system administrator of the sub-node sets the private key sk = (1, s) to decrypt the model parameter ciphertext, the public key pk = (b, a) to encrypt the medical data and initial model parameters, where b = -as + e mod Q, and the auxiliary calculation key evk = (b′, a′) to relinearize the ciphertext homomorphic multiplication calculation, where b′ = -a′s + e′ + bs 2 mod(pQ).
[0116] S4: The sub-node uses the public key to encrypt the traffic characteristic data through fully homomorphic encryption technology, and sends the encrypted traffic characteristic data to the master node;
[0117] In the embodiment of the present application, the sub-node system administrator sends a model training request to the master node system administrator and sends the initial model parameter matrix Initial velocity value matrix Traffic characteristic data matrix H n×(m+1) =(h ij ) n×(m+1) and label matrix Y n×(m+1) =(y ij )n×(m+1) Encrypt and send to the master node; let Z n×(m+1) ={H n×(m+1) ,B n×(m+1) ,V (0) n×(m+1) ,Y n×(m+1)}, the traffic characteristic data includes the quantified protocol version, source address, destination address, packet length, number of packet bytes, duration, etc.
[0118] In the embodiment of the present application, the node calls the plaintext encoding algorithm Encode(z)→m, and from the matrix H n×(m+1) Take each row vector Encoded as A polynomial with integer coefficients on π; using the inverse natural projection mapping 1 Expand the dimension of z to get π 1 (z), where π 1 The operation is defined as
[0119] in In order to improve the coding accuracy, the master node calculates pπ - 1(z), take its integer part "pπ - 1(z)”. In order to convert “pπ - 1(z)" is mapped to In , let the regular embedding function σ: Calculate the integer coefficient polynomial m H =σ - 1(「pπ -1 (z)”)∈R. The master node uses a similar method as above to convert the matrix B (0) n×(m+1) 、V (0) n×(m+1) , Y n×(m+1) Encode and obtain the corresponding plaintext polynomial m β ,m ν ,m Y .
[0120] In the embodiment of the present application, the subnodes use these plaintext polynomials m={m H , m β , m ν , m Y}, call the encryption algorithm Enc(m,pk)→ct, input the public key pk of the node, and calculate the ciphertext ct of m = {ct H , ct β , ct v , ct Y}:
[0121] ct=(rpk+(m+e0,e1))mod Q=(rb+m+e0,ra+e1)mod Q
[0122] In the embodiment of the present application, after encoding and encrypting each row vector in the matrix, the node obtains the traffic feature data matrix ciphertext Label Matrix Ciphertext Initial weight matrix ciphertext Initial velocity value matrix ciphertext The superscript "*" is a ciphertext identifier, indicating a matrix composed of ciphertext vectors. The obtained ciphertext is sent to the master node, and the system administrator of the master node sends the ciphertext to the cloud server after review.
[0123] S5: The cloud server uses the ciphertext and auxiliary computing key to execute the machine learning algorithm and obtain the model parameter ciphertext;
[0124] In an embodiment of the present application, the cloud server uses the ciphertext and the auxiliary computing key to execute the machine learning algorithm, including the following steps:
[0125] The homomorphic multiplication and addition rules in a fully homomorphic encryption environment were established, laying the foundation for subsequent ciphertext calculations;
[0126] The characteristic data matrix H in ciphertext form is homomorphically multiplied with the initial velocity matrix V, and linearized and scaled by an auxiliary calculation key to prepare for inner product calculation.
[0127] Through a series of carefully designed ciphertext rotations and homomorphic addition operations, the inner product of the feature and velocity matrices is efficiently calculated to prepare for constructing the gradient of the loss function.
[0128] The polynomial approximation of the Sigmoid function is implemented in the ciphertext domain. Through multiple homomorphic multiplication and addition calculations, the output matrix of the approximate Sigmoid function is obtained. This process is crucial for subsequent gradient calculations.
[0129] The gradient of the loss function is calculated through ciphertext operations, and the Nesterov gradient descent method is applied. In combination with the learning rate a and the speed value v, the model parameter β is updated, and the speed value is adjusted to accelerate convergence and improve model accuracy. Through multiple rounds of iterations, the model parameter ciphertext B and the speed ciphertext V are updated in each iteration until the predetermined number of iterations k is reached, during which the update pace is dynamically adjusted using the decay rate v;
[0130] The Bootstrapping technology is introduced to solve the problem of the ciphertext modulus decreasing with iteration. Through the four steps of modulus expansion, decoding, modulus extraction and encoding, the continued feasibility and accuracy of ciphertext calculation are ensured, maintaining the stability of long-term calculation.
[0131] In the embodiments of the present application, Figure 6 As shown, this application uses a fully homomorphic encryption algorithm to define homomorphic multiplication and homomorphic addition between ciphertext matrices as follows:
[0132] There are two ciphertext matrices A n×(m+1) * and B n×(m+1) * ,
[0133] A n×(m+1) * and B n×(m+1) * The homomorphic multiplication of is:
[0134]
[0135] A n×(m+1) * and B n×(m+1) * The homomorphic addition of is:
[0136]
[0137] After the cloud server obtains the ciphertext, it uses the ciphertext to perform logistic regression calculations. During the calculation process, each iteration will update the model weight parameters and speed values. In order to reduce the number of iterations of model training and thus improve the computational efficiency of model training, this application uses the Nesterov gradient descent method to speed up the convergence speed. The iterative formula for each round of logistic regression calculation after the Nesterov gradient descent method is:
[0138]
[0139] According to formula (1), the Nesterov gradient descent method adds the parameter speed value to the traditional logistic regression algorithm. First set the initial speed value v ij (0) =β ij (0)) , and then in each round of iteration, use the speed value of the current round To update the weight parameters for the next iteration Where t represents the iteration round, using and the weight parameters of the current round The next iteration The update direction of the weight parameters in each iteration is not only affected by the gradient of the current iteration, but also takes into account the predicted gradient of the next iteration, thereby reducing the update amplitude, setting a larger learning rate α, and improving the convergence speed. In addition, the Nesterov gradient descent method reduces the update amplitude when approaching the optimal value, which can reduce the possibility of missing or exceeding the optimal value and improve the convergence accuracy.
[0140] This application uses fully homomorphic ciphertext to execute the logistic regression algorithm optimized by Nesterov gradient descent method. There are 10 steps in total:
[0141] S5.1: The cloud server first sends the ciphertext H n×(m+1) * The first row vector in V (0) n×(m+1) * The first row of vectors in are bit-wise homomorphically multiplied, and the auxiliary calculation key evk is used to relinearize and rescale the ciphertext of the product vector, thereby reducing the dimension of the ciphertext and restoring the scaling factor of the product vector ciphertext to obtain the product vector ciphertext Because H n×(m+1) * and V (0) n×(m+1) * There are n rows of vectors in , so there are n rows of product vector ciphertexts to form the matrix ciphertext CT1 = (h ij * ·V ij * ) n×(m+1) , the homomorphic multiplications in the following steps need to be relinearized and rescaled;
[0142] S5.2: The cloud server uses the function rotate(ct h.v ,1), ct h.v Rotate the elements in left by 1 bit, and convert the row vector ciphertext ct h.v The elements in are shown in formula (2):
[0143]
[0144] The vector ciphertext after left rotation by 1 bit is:
[0145] rotate(ct h·v ,1)=[v 01 (0)* ·h 01 * ...v 0m (0)* ·h 0m *v 00 (0)* ·h00 * ]
[0146] Homomorphically add the vector ciphertext before and after the shift to obtain the new vector ciphertext:
[0147]
[0148] The cloud server repeats the left rotation by 1 bit and the homomorphic addition operation m-1 times to obtain the vector ciphertext ct r As shown in formula (3):
[0149]
[0150] The matrix ciphertext CT1 has a total of n rows of vector ciphertexts. Repeat the left rotation of each of these n rows of vector ciphertexts by 1 bit and add them m-1 times to obtain the inner product matrix ciphertext The calculation method of CT2 is as follows Figure 3 shown.
[0151] S5.3: Cloud servers will Substituting into the Sigmoid approximation polynomial, the Sigmoid approximation polynomial is shown in formula (4):
[0152] δ(x)=-0.004 ·x 3 +0.197 ·x+0.5 (4)
[0153] In order to find the ciphertext matrix of the approximate polynomial, first cipher the matrix Homomorphically multiply with CT2 and rescale, where c ij =-0.004, we get (-0.004·r ij ) n×(m+1) The ciphertext CT3=((-0.004·r ij ) * ) n×(m+1) ;
[0154] The cloud server homomorphically multiplies CT2 and CT2 and rescales it to obtain The ciphertext Then, the ciphertext CT3 and ciphertext CT4 are homomorphically multiplied and rescaled to obtain The ciphertext
[0155] Cloud Server Get After the ciphertext CT5, we can find (0.197·r ij ) n×(m+1) The matrix ciphertext of e ij =0.197, the matrix ciphertext Multiplying with CT2 and rescaling it homomorphically, we get (0.197·r ij ) n×(m+1) The ciphertext
[0156] The cloud server will The matrix ciphertext CT5, (0.197·r ij ) n×(m+1) The matrix ciphertext CT6, Homomorphic addition, here g ij = 0.5, and the ciphertext of the approximate polynomial matrix is obtained The calculation process of Sigmoid approximation polynomial is as follows Figure 4 shown.
[0157] S5.4: The cloud server ciphers the label matrix Y n×(m+1) * Subtract the matrix ciphertext from the approximation polynomial Get the ciphertext
[0158] S5.5: The cloud server then encrypts CT7 and the traffic feature data H n×(m+1) * Homomorphic multiplication and rescaling to get the ciphertext
[0159] S5.6: Aggregate all row vectors in CT8 to calculate the gradient of the loss function: By adding all row vectors in the matrix ciphertext CT8 bit by bit, and then homomorphically multiplying the result by the inverse of n, the loss function gradient matrix ciphertext is obtained:
[0160]
[0161] S5.7: The cloud server multiplies the learning rate α by CT9 to get CT 10 , and then use the speed value ciphertext V 0)* With CT 10 Add together to get the new weighted ciphertext
[0162] CT 10 =((α·d ij ) * ) n×(m+1)
[0163]
[0164] S5.8: Get the new weight ciphertext matrix B (1) n×(m+1) * After that, the cloud server will (0) n×(m+1) *Multiply each element in by the decay rate γ to get CT 11 , and then B (1) n×(m+1) * Multiply each element in by (1-γ) to get CT 12 , and then CT 11 With CT 12 Add together to get V (1) n×(m+1) * , thus completing a logistic regression iteration:
[0165] CT 11 =((β (0) ij γ) * ) n×(m+1)
[0166] CT 12 =((β (1) ij (1-γ) * ) n×(m+1)
[0167]
[0168] S5.9: The cloud server then updates the weight B (1) n×(m+1) * As the new weight in the second iteration, V (1) n×(m+1) * As the new speed value in the second iteration, repeat the steps in the first iteration, and after k iterations, get the weight matrix ciphertext The cloud server will (k) n×(m+1) * Send it to the master node system administrator, who will send B (k) n×(m+1) * The data is stored locally and sent to the node that made the request. The process of updating the weights of the Logistic regression algorithm (FHE-Logistic algorithm) of the encrypted traffic feature data is as follows: Figure 5 shown.
[0169] S5.10: During the iteration process, since the machine learning algorithm involves multiple iterations, and each iteration will cause the ciphertext modulus to decrease, it is possible that the initial ciphertext modulus will be consumed during the calculation process, making it impossible to perform subsequent ciphertext calculations. Therefore, this application uses Bootstrapping technology to restore the ciphertext modulus to the initial modulus. First of all, Bootstrapping technology mainly has four steps: modulus expansion (ModRaise), homomorphic decoding (CoeffToSlot), homomorphic modulus (EvalMod), and homomorphic encoding (SlotToCoeff). The overall formula is as follows:
[0170]
[0171] The expansion operation includes: the cloud server has a traffic feature ciphertext ct=(c0,c1)modQ1 whose modulus is about to be exhausted, and its corresponding plaintext polynomial is m(X)=(c0+c1s). The modulus of the ciphertext polynomial is increased to Q0, and t(X)=(c0+c1s)modQ0, then: (c0+c1s)modQ0=t(X) is reflected in the ciphertext as: the modulus of (c0,c1)modQ1 is increased to Q0 (Q0 and Q1 are both multiples of q). This step is to increase the ciphertext modulus. The cloud server can not only perform more multiplication operations on the ciphertext, but also set a larger scaling modulus q when setting encryption parameters to improve the ciphertext calculation accuracy. However, due to the existence of the modulus, mmodQ0 and tmodQ0 are essentially different, so the remaining three steps are required.
[0172] Homomorphic decoding includes decoding the plaintext polynomial t(X) = (c0 + c1s) mod Q0 in the ciphertext state. The decoding here is to bring the primitive root into X in t(X) to obtain the decoded vector tmod Q0.
[0173] Homomorphic modulo includes that the cloud server uses a trigonometric function sin to fit tmodQ0 in the encrypted state, so as to obtain tmodQ0=m, that is, to obtain the real m, which solves the problem that mmodQ0 and tmodQ0 are essentially different.
[0174] Homomorphic encoding includes the steps of homomorphic encoding and homomorphic decoding are opposite. The cloud server uses tmodq in the ciphertext state to encode t into t(X). The encoding method refers to the plaintext encoding algorithm in S4. So far, the Bootstrapping operation is completed.
[0175] S6: After receiving the model parameter matrix ciphertext, the model parameter matrix ciphertext is decrypted and decoded using the private key to obtain the model parameters;
[0176] In the embodiment of the present application, the sub-node system administrator receives the model parameter matrix ciphertext B (k) n×(m+1) * After that, the matrix ciphertext is decrypted using the private key sk. (k) n×(m+1) * It consists of n identical row vectors, so sk is used to decrypt B (k) n×(m+1) * The first row vector in Get the plaintext polynomial Sub-nodes in decoding algorithm Input Use the regularized embedding σ(·) to obtain Divide by the scaling factor p to get π -1 (z), and then use the natural projection mapping π to reduce its dimension to N / 2, and output the model parameter vector z B =π(π -1 (z))=[β0 (k) β1 (k) ,…,β m (k) ].
[0177] In the embodiment of the present application, the node is based on the model parameter plaintext vector [β0 (k) β1 (k) ,…,β m (k) ] to the logistic regression model formula (5), the logistic regression model formula is as follows:
[0178]
[0179] fea in formula (3-5) i It represents the characteristic parameters that cause the traffic. There are a total of m+1 features, and each feature corresponds to a unique weight. The larger the corresponding weight, the more likely the feature is to be the main feature of the abnormal traffic. If the corresponding weight is closer to 0, it means that the feature is less likely to be the main feature of the abnormal traffic.
[0180] In the embodiment of the present application, the sub-node uses a test data set to test the accuracy of the model. The test data set consists of traffic feature parameters and corresponding labels in the local database of the sub-node. The sub-node will fea i Substitute into formula (5) to calculate the result M, and then substitute M into formula (6):
[0181]
[0182] Where, e is the natural logarithm;
[0183] In an embodiment of the present application, if the corresponding prediction value is 0, it indicates that the traffic packet is not abnormal traffic. If the corresponding prediction value is 1, it indicates that the traffic packet is abnormal traffic. The obtained prediction value is compared with the label value in the test data set. The more prediction values that are equal to the label value in the test data set, the higher the model accuracy.
[0184] In an embodiment of the present application, the sub-node uses the public key of the main node to encrypt the model parameters and sends the ciphertext to the main node. The system administrator of the main node uses the private key to decrypt the model parameters and backs up the results of the traffic characteristic data calculation.
[0185] S7: Detect device assets at each node, quantify the detection information and input it into the model parameters to determine whether it is abnormal traffic;
[0186] In the embodiment of the present application, the master node constructs a fingerprint identification feature library of all sub-nodes, and the sub-node constructs a feature library of the zone in which it is located, and the feature library contains protocol version, source address, destination address, packet length, number of packet bytes, duration, IP and domain name information, port information, etc. The master node uses the system to monitor the industrial control information system of all sub-nodes, and the sub-node counts all open ports in the zone it is responsible for, and excludes common ports, sends a detection data packet to the special function port of the industrial control information system in the zone, and receives the returned data packet information, and extracts the protocol information from the data packet, which contains the protocol version, source address, destination address, packet length, number of packet bytes, duration, etc., and then quantizes the protocol information into a numerical form for easy calculation.
[0187] S8: Based on the abnormal traffic judgment results and combined with operation and maintenance decisions, complete the industrial control information asset detection.
[0188] In the embodiment of the present application, the quantized protocol information is then input into the model formula f(M) to predict whether the traffic is abnormal traffic, and then the operating system type of the target host is determined by comparing the content of the received and sent TCP / UDP / ICMP response data packet with the local operating system rule base;
[0189] In the embodiment of the present application, by parsing the detection response information, the service information of the host, the enabled services, the device type, the domain name, the WEB service response header and the complete response body information are obtained, and then the MAC address in the data packet is obtained. After that, each set of feature information is organized into arrays. If the information can be matched to the corresponding asset in the feature library, the detection of the next asset is continued; if the corresponding asset cannot be matched and it is normal traffic, the asset feature information is stored in the feature library and mapped to the blockchain; if the corresponding asset cannot be matched and it is abnormal traffic, an alarm is issued and the feature information is reported to the system operation and maintenance personnel. If the operation and maintenance personnel determine that the traffic comes from a new legal asset, the asset feature information is stored in the feature library and mapped to the blockchain. If the operation and maintenance personnel determine that the traffic is malicious traffic, the IP address is blocked.
[0190] In the embodiment of the present application, after each district has sorted out its own asset detection information, if there is a new asset, the smart contract SC is used to map the identified asset information to the ring of the district, such as Figure 8 As shown, the mapping method is: use n1, n2, and n3 to represent several specific information parameters of the zone (specific information parameters are kept secret), and x represents the IP address of a device in the zone. First, fill x and represent the IP address with 12 digits, such as the original IP address: 192.168.1.1, and the filled IP address: 192.168.001.001, and then remove the "." to facilitate the mapping calculation. Then, the processed x is executed through the smart contract formula: Calculate a unique y, so that:
[0191] y≡x(modn1)
[0192] y≡x(modn2)
[0193] y≡x(modn3)
[0194] Calculate y according to the formula of the Chinese Remainder Theorem CRT:
[0195] y=(x * M1 * a1+x * M2 * a2+x * M3 * a3)modN
[0196] Among them, M1, M2 and M3 are n2 * n3, n1 * n3 and n1 * n2, a1, a2 and a3 are the modular inverse of M1 with respect to n1, the modular inverse of M2 with respect to n2 and the modular inverse of M3 with respect to n3 respectively. N is n1 * n2* n3, which can be mapped to the modulo n1 of this area * n2 * n3 ring, which not only reduces the computational overhead, but also the mapping formula y=CRT(x,n1,n2,n3)=(x * M1 * a1+x * M2 * a2+x * M3 * a3) modN, using smart contract SC to calculate, thus simplifying the work steps of operation and maintenance personnel
[0197] Smart contract SC is written, such as Figure 7 As shown, ID U It is the employee number of the operation and maintenance personnel in this area. M is the area code, T2 is the timestamp, Hash is the hash value of the detection information, Sig is the digital signature of the operation and maintenance personnel, ip is the IP address of the detected asset, and n1, n2, and n3 are the unique information parameters of the area.
[0198] In the embodiments of the present application, Fig. 9 As shown, each distinguishing node performs hash calculation on the collected mapping value y and the detection data in array format, and then stores y and the hash value in the sub-block chain, and compares y with the local feature library to find the corresponding asset information, and then compares the hash value with the assets in the sub-node. If a new asset is detected, the sub-node stores y and the new hash value in the sub-block chain, and sends y, the hash value and the corresponding feature array to the main node. The main node then stores y and the hash value in the feature library (main blockchain), and the corresponding feature array in the local database.
[0199] In an embodiment of the present application, the system administrator of the master node regularly saves the original encryption parameters in secret and generates new fully homomorphic encryption parameters to prepare for the next outsourced calculation. At the same time, the information of the cloud server participating in this outsourced calculation (including the identity information of the cloud server operation and maintenance personnel, the cloud server device number, the calculation time, etc.) is recorded in the local database, and is sent to the sub-node after being encrypted with the public key of the sub-node, and the sub-node decrypts and saves it secretly. If the model parameter accuracy obtained by this outsourced calculation is high, the master node increases the reputation points of the cloud server participating in the calculation, and at the same time, the cloud server administrator hashes his own device number to generate a hash value, uses the private key to encrypt the hash value to generate a digital signature, and then sends the digital signature, administrator identity number, and outsourced calculation timestamp to the master node for storage to record this outsourced calculation. If the model accuracy of the outsourced calculation is very low, another cloud server is selected for outsourced calculation, and the accuracy of the two model parameters is compared. If both are very low, it indicates that the traffic feature data set needs to be cleaned. If the accuracy of the latter model parameter is higher than that of the former, the reputation points of the former cloud server are deducted, and the subsequent ciphertext calculation service is outsourced to the latter cloud server.
[0200] This embodiment also provides an industrial control information asset security detection system based on fully homomorphic encryption and CRT, including:
[0201] The construction module is used to build a distributed security network based on industrial control equipment assets, in which the master node establishes the main blockchain and each sub-node establishes its own sub-blockchain;
[0202] Audit module, which is used to register and audit information for each sub-node and cloud server based on a distributed security network, assign a unique identity number ID to them, and generate encryption parameters;
[0203] The generation module is used by each sub-node to generate public keys, private keys and auxiliary calculation keys using user key generation algorithms and encryption parameters;
[0204] An encryption module is used for the sub-nodes to encrypt the traffic characteristic data using the public key through the fully homomorphic encryption technology, and send the encrypted traffic characteristic data to the master node;
[0205] A computing module, used for the cloud server to execute the machine learning algorithm using the ciphertext and the auxiliary computing key to obtain the ciphertext of the model parameters;
[0206] A decryption module is used to decrypt and decode the ciphertext of the model parameter matrix using a private key to obtain the model parameters after receiving the ciphertext of the model parameter matrix;
[0207] The input module is used to detect device assets at different nodes, quantify the detection information and input it into the model parameters to determine whether it is abnormal traffic;
[0208] The decision-making module is used to complete industrial control information asset detection based on abnormal traffic judgment results and combined with operation and maintenance decisions.
[0209] Furthermore, it also includes:
[0210] Memory, used to store programs;
[0211] A processor is used to load the program to execute the industrial control information asset security detection method based on fully homomorphic encryption and CRT.
[0212] This embodiment also provides a computer-readable storage medium storing a program, which, when executed by a processor, implements the industrial control information asset security detection method based on fully homomorphic encryption and CRT.
[0213] The storage medium proposed in this embodiment and the industrial control information asset security detection method based on fully homomorphic encryption and CRT proposed in the above embodiment belong to the same inventive concept. The technical details not described in detail in this embodiment can be referred to the above embodiment, and this embodiment has the same beneficial effects as the above embodiment.
[0214] Through the above description of the implementation method, the technicians in the relevant field can clearly understand that the present invention can be implemented by means of software and necessary general hardware, and of course it can also be implemented by hardware, but in many cases the former is a better implementation method. Based on such an understanding, the technical solution of the present invention is essentially or the part that contributes to the prior art can be embodied in the form of a software product, and the computer software product can be stored in a computer-readable storage medium, such as a computer floppy disk, read-only memory (ReadOnly, Memory, ROM), random access memory (RandomAccessMemory, RAM), flash memory (FLASH), hard disk or optical disk, etc., including a number of instructions for a computer device (which can be a personal computer, server, or network device, etc.) to perform the methods of various embodiments of the present invention.
[0215] Example 2
[0216] Referring to Table 1, it is an embodiment of the present invention. This embodiment is different from the first embodiment in that this embodiment verifies the beneficial effects of the present invention through comparative tests.
[0217] In this embodiment, the new network asset detection method using fully homomorphic encryption and CRT is compared and verified, and the improvement effect in data security, computing efficiency, privacy protection capability, operation and maintenance response speed, and anomaly detection accuracy is compared with the current standard network asset detection scheme. In this embodiment, a medium-sized enterprise network environment containing 1,000 different types of network devices is simulated; the synthetic network traffic data, including normal operations and known abnormal behaviors, is 1TB in total; the security threat model includes but is not limited to typical threats such as man-in-the-middle attacks, data tampering, and privacy leakage; performance benchmarking tools, industry standard tools are selected to measure performance indicators such as computing efficiency and response time.
[0218] Solution 1: Encryption method: Use traditional symmetric encryption algorithms. Asset detection software: Common open source or commercial network asset management systems on the market. Anomaly detection model: Basic model based on machine learning, using random forest model. Solution 2: Encryption method: Fully homomorphic encryption combined with CRT technology. Asset detection software: Customized software, integrated with fully homomorphic encryption processing module. Anomaly detection model: Enhanced model, supports direct processing of encrypted data, and uses deep learning model.
[0219] Preparation phase: Environment construction: Build two isolated virtual network environments to ensure that they have the same hardware configuration and network topology. Data preparation: Deploy the same data set in the two environments, including simulated daily network activities and preset abnormal events. System deployment: Deploy the original network asset detection solution in the first environment; deploy the new method system in the second environment. The experimental results are shown in Table 1:
[0220] Table 1 Comparison table
[0221]
[0222]
[0223] As can be seen from Table 1, our invention has taken more detailed considerations in terms of ensuring the security, privacy, efficiency and intelligent management of network asset detection. It uses fully homomorphic encryption technology to ensure the security of data during transmission and processing. Even if the data is intercepted, it cannot be directly interpreted, effectively preventing data leakage. Combined with blockchain technology, it further ensures the immutability of information. Through the distributed ledger and consensus mechanism of blockchain, it provides powerful anti-tampering capabilities to ensure the authenticity and integrity of network asset information. Without leaking the original data, it uses auxiliary calculation keys to support machine learning operations on encrypted data, realizing "data available but invisible", and effectively protecting the privacy of sensitive traffic feature data. By optimizing algorithms and strategies, it can still maintain a relatively fast operation and maintenance response speed, while improving the accuracy of abnormal traffic judgment, which helps to quickly identify and respond to network security threats. It not only supports the execution of one-time machine learning tasks on encrypted data, but also can perform multiple iterations, continuously optimize the model, and improve the accuracy of prediction and classification. Through distributed network architecture and automated review processes, the management efficiency of device information is significantly improved, the need for manual intervention is reduced, and errors and delays are reduced. It can uniformly manage heterogeneous equipment information from different manufacturers, solve the management difficulties caused by the diversity of equipment types, and simplify equipment asset management in complex network environments.
[0224] It should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention rather than to limit it. Although the present invention has been described in detail with reference to the preferred embodiments, those skilled in the art should understand that the technical solutions of the present invention may be modified or replaced by equivalents without departing from the spirit and scope of the technical solutions of the present invention, which should all be included in the scope of the claims of the present invention.
Claims
1. A method for detecting industrial control information assets based on fully homomorphic encryption and CRT, characterized in that: include: Based on industrial control equipment assets, a distributed security network is built, in which the master node establishes the main blockchain and each sub-node establishes its own sub-blockchain; Based on a distributed security network, the master node registers and reviews information for each sub-node and cloud server, assigns a unique ID to it, and generates encryption parameters; Each sub-node uses the user key generation algorithm and encryption parameters to generate public keys, private keys and auxiliary calculation keys; The sub-node uses the public key to encrypt the traffic characteristic data through fully homomorphic encryption technology, and sends the encrypted traffic characteristic data to the master node; The cloud server uses the ciphertext and auxiliary computing key to execute the machine learning algorithm and obtain the model parameter ciphertext; After receiving the model parameter matrix ciphertext, the model parameter matrix ciphertext is decrypted and decoded using the private key to obtain the model parameters; Detect device assets at each node, quantify the detection information and input it into the model parameters to determine whether it is abnormal traffic; Based on the abnormal traffic judgment results and combined with operation and maintenance decisions, industrial control information asset detection is completed.
2. The industrial control information asset security detection method based on fully homomorphic encryption and CRT as claimed in claim 1, characterized in that: The method of encrypting the traffic feature data by using the fully homomorphic encryption technology includes: the master node registers and reviews the relevant information for each sub-node and cloud server, assigns a unique identity number ID, and generates encryption parameters; The generating of encryption parameters comprises the following steps: Select a power of 2 N as the maximum degree of the ciphertext polynomial; Choose a particular modulus p; According to the expected number of logistic regression multiplications L, calculate the ciphertext modulus Q = p L , while ensuring that Q and N meet the safety level parameter λ, that is Construct a polynomial quotient ring Choose a private key distribution X in the polynomial ring R s , introduce an error distribution X e and a random distribution X r , as a randomizing element in the encryption process; Summarize and generate a common parameter set Params = {Q, X s ,R,X e ,X r ,p} and send it to each branch node.
3. The industrial control information asset security detection method based on fully homomorphic encryption and CRT as described in claim 1 or 2, characterized in that: The method of using the user key generation algorithm and encryption parameters to generate the public key, private key and auxiliary calculation key required by the fully homomorphic encryption technology includes: The nodes are randomly and uniformly sampled from a discrete Gaussian distribution on the polynomial quotient ring R to obtain the distribution X related to the private key. s , random distribution X r , error distribution X e ; In private key distribution X s Select s from the random distribution X to form the private key. r Randomly select r as an integer and in the error distribution X e Select e and e′ as error distribution polynomials; Randomly and uniformly select polynomial a from R to form a fully homomorphic public key, and a′ to form an auxiliary calculation key evk; Get the public key pk, private key sk and auxiliary calculation key evk; The public key pk is expressed as: pk=(b,a) b=-a·s+e mod Q The private key sk is expressed as: sk=(1,s) The auxiliary calculation key evk is expressed as: evk=(b′,a′) b′=-a′s+e′+bs 2 mod(pQ)。 4. The industrial control information asset security detection method based on fully homomorphic encryption and CRT as claimed in claim 3, characterized in that: The method of encrypting the traffic characteristic data by using the fully homomorphic encryption technology and sending the encrypted traffic characteristic data to the master node includes: Prepare various matrices required for model training in different nodes, including the initial model parameter matrix B (0) n×(m+1) , initial velocity value matrix V (0) n×(m+1) , traffic characteristic data matrix H n×(m+1) And the label matrix Y n×(m+1) , these matrices together constitute the data set Z n×(m+1) ; Mapping π via inverse natural projection -1 Expand the vector dimension by calculating p·π -1 The integer part of (z) is mapped into the target polynomial ring using the regular embedding function σ; Using the fully homomorphic encryption algorithm, based on the generated public key pk, the encoded plaintext polynomial m = {m H ,m β ,mv,m Y } is converted to the corresponding ciphertext ct = {ct H ,ct β ,ct v ,ct Y }; After encryption is completed, the sub-node sends the ciphertext form of all matrices to the main node. After the main node verifies and confirms that it is correct, it forwards the encrypted data to the cloud server.
5. The industrial control information asset security detection method based on fully homomorphic encryption and CRT as claimed in claim 4, characterized in that: The cloud server uses the ciphertext and the auxiliary computing key to execute the machine learning algorithm, and the obtained model parameter ciphertext includes: Set homomorphic multiplication and addition rules in a fully homomorphic encryption environment; Use the encrypted feature data matrix H to perform homomorphic multiplication with the initial velocity matrix V, and perform linearization and scaling through the auxiliary calculation key; The inner product of the feature and velocity matrices is calculated through ciphertext rotation and homomorphic addition operations; Through multiple homomorphic multiplication and addition calculations, the output matrix of the approximate Sigmoid function is obtained; The gradient of the loss function is calculated through ciphertext operation, and the Nesterov gradient descent method is applied. The model parameter β is updated and the speed value is adjusted by combining the learning rate a and the speed value v. Through multiple rounds of iterations, the model parameter ciphertext B and speed ciphertext V are updated in each iteration until the predetermined number of iterations k is reached, and the update pace is dynamically adjusted using the decay rate v; Bootstrapping technology is introduced to obtain the optimized model parameter ciphertext through model expansion, decoding, model extraction and encoding.
6. The industrial control information asset security detection method based on fully homomorphic encryption and CRT as claimed in claim 5, characterized in that: After receiving the model parameter matrix ciphertext, the model parameter matrix ciphertext is decrypted and decoded using the private key to obtain the model parameters including: The node system administrator receives the encrypted model parameter data after multiple iterations of optimization transmitted from the cloud server. Use the pre-held private key sk to decrypt the ciphertext; The plaintext polynomial obtained after decryption Processed by decoding algorithm Decode; Will The input decoding algorithm Decode uses the regular embedding σ(·) to obtain Divide by the scaling factor p to get π -1 (z); Use the natural projection mapping π to reduce its dimension to N / 2 and output the model parameter vector z B =π(π -1 (z))=[β0 (k) β1 (k) ,…,β m (k) ] The nodes are divided according to the model parameter plaintext vector [β0 (k) β1 (k) ,…,β m (k) ], and get the logistic regression model formula; The sub-node uses a test data set to test the accuracy of the model. The test data set consists of traffic feature parameters and corresponding labels in the local database of the sub-node; The sub-nodes will calculate the traffic characteristic parameters fea in each test data set i Substitute into the logistic regression model formula, calculate the result M, and substitute M into the prediction value calculation formula; If the corresponding prediction value is 0, it means that the traffic packet is not abnormal traffic. If the corresponding prediction value is 1, it means that the traffic packet is abnormal traffic. The sub-nodes use the public key of the master node to encrypt the model parameters and send the ciphertext to the master node. The system administrator of the master node uses the private key to decrypt the model parameters and backs them up for storage. The logistic regression model formula is expressed as: The predicted value calculation formula is expressed as: Here, e represents the natural logarithm.
7. The industrial control information asset security detection method based on fully homomorphic encryption and CRT as claimed in claim 6, characterized in that: The operation and maintenance decisions include: Input the quantified protocol information into the model formula f(M) to determine whether the current traffic is abnormal traffic; If the current traffic matches the corresponding asset in the feature library, it is not abnormal traffic and the detection of the next asset will be continued; If the corresponding asset cannot be matched and the traffic is abnormal, an alarm will be issued and it will be determined whether it is a new asset device. If the current traffic is abnormal and is not a new asset device, block its source IP address; If the corresponding asset cannot be matched and it is a new asset device, the asset feature information will be stored in the feature library and mapped to the blockchain.
8. A system based on the industrial control information asset security detection method based on fully homomorphic encryption and CRT according to claim 1, characterized in that: include: The construction module is used to build a distributed security network based on industrial control equipment assets, in which the master node establishes the main blockchain and each sub-node establishes its own sub-blockchain; Audit module, which is used to register and audit information for each sub-node and cloud server based on a distributed security network, assign a unique identity number ID to them, and generate encryption parameters; The generation module is used by each sub-node to generate public keys, private keys and auxiliary calculation keys using user key generation algorithms and encryption parameters; An encryption module is used for the sub-nodes to encrypt the traffic characteristic data using the public key through the fully homomorphic encryption technology, and send the encrypted traffic characteristic data to the master node; A computing module, used for the cloud server to execute the machine learning algorithm using the ciphertext and the auxiliary computing key to obtain the ciphertext of the model parameters; A decryption module is used to decrypt and decode the ciphertext of the model parameter matrix using a private key to obtain the model parameters after receiving the ciphertext of the model parameter matrix; The input module is used to detect device assets at different nodes, quantify the detection information and input it into the model parameters to determine whether it is abnormal traffic; The decision-making module is used to complete industrial control information asset detection based on abnormal traffic judgment results and combined with operation and maintenance decisions.
9. An electronic device, characterized in that: include: Memory, used to store programs; A processor is used to load the program to execute the steps of the industrial control information asset security detection method based on fully homomorphic encryption and CRT as described in any one of claims 1 to 7.
10. A computer-readable storage medium storing a program, characterized in that: When the program is executed by the processor, the steps of the industrial control information asset security detection method based on fully homomorphic encryption and CRT as described in any one of claims 1 to 7 are implemented.
