Industrial device configuration method based on double-chain architecture

The industrial equipment configuration method using a dual-chain architecture stores user data and configuration operation data separately, and uses dynamic keys to achieve dual-layer protection, solving the single point of failure and data security problems of traditional systems, and improving the security and reliability of the configuration process.

CN118316712BActive Publication Date: 2026-03-24CHONGQING UNIV OF POSTS & TELECOMM
View PDF 2 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-05-07
Publication Date
2026-03-24

AI Technical Summary

Technical Problem

Traditional industrial equipment configuration systems are prone to single points of failure, are difficult to defend against external illegal attacks and internal operational errors, and lack data security and access control during the configuration process.

Method used

An industrial equipment configuration method based on a dual-chain architecture is adopted, which stores user data and configuration operation data separately through a user information data chain and a configuration operation chain, and uses dynamic keys to achieve dual-layer protection for identity authentication and access control.

Benefits of technology

It improves the security and reliability of the industrial equipment configuration process, prevents configuration errors from being traced in a timely manner, and enhances data privacy protection and access management.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118316712B_ABST
    Figure CN118316712B_ABST
Patent Text Reader

Abstract

The application relates to an industrial equipment configuration method based on a double-chain architecture and belongs to the field of industrial equipment automation. The double-chain architecture is used to realize a double-layer protection function. First, a user information data chain is used to form a first protection, and identity authentication is performed on an operation user. If the identity authentication fails, the user will not be able to enter subsequent configuration operation, and information data of the illegal user will not be packaged and uploaded. Then, a configuration operation chain is used to form a second protection, and permission control is performed on a configuration request to be operated by the user. Whether the user is qualified for the configuration operation permission is judged according to the user permission through a consortium chain consensus, so that the configuration operation can be continuously completed, and the process is packaged and uploaded.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention belongs to the field of industrial equipment automation and relates to an industrial equipment configuration method based on a dual-chain architecture. Background Technology

[0002] With the continuous development and rapid expansion of industrial networks, the configuration, operation, and management of industrial equipment are becoming increasingly complex, and the security of industrial equipment configuration cannot be ignored. Configuration security issues not only stem from attacks by unauthorized external users, but also from malicious hijacking or attacks on the equipment, as well as configuration errors caused by improper operation or mistakes by internal personnel. Therefore, all of these security vulnerabilities can pose a significant threat to the configuration of industrial equipment. Simultaneously, the increasing number of industrial devices and their growing diversity and differences present significant challenges to industrial equipment configuration, demanding higher security standards. In this context, effectively strengthening the prevention of unauthorized external attacks and controlling the access permissions of internal operators have become crucial aspects of ensuring the security of industrial equipment configuration.

[0003] To address the aforementioned issues, traditional industrial equipment configuration systems typically employ an intermediate server to achieve unified management and access control for operators and equipment accounts. However, this centralized architecture also becomes a single point of failure for the entire configuration system. This architecture is vulnerable to external attacks and struggles to promptly trace configuration data and operators when errors occur, leading to higher costs for security maintenance. Therefore, to prevent errors during industrial equipment configuration and reduce potential security risks, it is necessary to design a secure configuration method for industrial equipment.

[0004] Blockchain technology is a method that utilizes a blockchain data structure to verify and store data, a distributed node consensus algorithm to generate and update data, and cryptography to ensure secure data transmission and access. Blockchain technology possesses characteristics such as decentralization and tamper-proof nature. Therefore, this invention applies blockchain technology to the configuration process of industrial equipment, which can avoid potential single points of failure, increase the cost of attacks, and improve the reliability and security of the entire configuration process. Summary of the Invention

[0005] In view of this, the purpose of the present invention is to provide an industrial equipment configuration method based on a dual-chain architecture.

[0006] To achieve the above objectives, the present invention provides the following technical solution:

[0007] An industrial equipment configuration method based on a dual-chain architecture, comprising the following steps:

[0008] S1: Initialization Phase: Configure the system server to install the consortium blockchain client. The consortium blockchain network selects master and slave nodes according to the consensus algorithm. The master node determines the industrial devices that each system user can access and the operations that can be configured. The configuration system CS records the previous status of the industrial devices before IE configuration and assigns a number to each industrial device IE, referring to it as a device. Put the equipment And the initial state is written into the genesis block;

[0009] set up U i Identity identifier; Industrial equipment E i Identity identifier; U i The public key; U i P's private key; PN S represents the public key of the master node PN; PN This represents the private key of the master node PN; This indicates the use of the master node's public key P. PN Encrypt ms; P RN S represents the public key of the slave node RN; RN Represents the private key of the slave node RN; TimeStamp represents the current timestamp; Hash() represents the hash function; ES() represents the elliptic curve digital signature algorithm; E'() represents the encryption algorithm based on asymmetric encryption; req represents the request message; Digital Cert represents the digital certificate issued by the CA; DynamicKey represents the dynamic key; Previous Status represents the initial state before configuration; End Status represents the device's end state recorded after configuration; GF(p) represents the base field of the elliptic curve; p represents a large prime number; (a,b) represents a point on the elliptic curve; E p (a,b) denotes an elliptic curve within a finite field; N denotes the order of the elliptic curve; G(x G ,y G () represents the base point on the elliptic curve; Account number indicating industrial equipment; This refers to the account password for industrial equipment;

[0010] S2: User registration completion stage: Users enter their identity information, obtain their user identity account, and send the identity registration request message and timestamp to the review and registration agency RA;

[0011] S3: User Identity Authentication Stage: After a user completes registration, the Registration Authority (RA) reviews the received user registration information. Once the review is passed, the information is submitted to the Certificate Authority (CA) for identity authentication. After successful authentication, the CA issues a digital signature certificate (Digital Cert) to the user and the key server generates a dynamic key to package the user information data onto the blockchain.

[0012] S4: Consensus Phase of Consortium Blockchain Network: The master node receives the configuration transaction request and broadcasts it to the slave nodes; the consensus network performs consensus judgment on the configuration transaction request data, and if a consensus is reached, the transaction request is sent to the configuration system CS;

[0013] S5: Configuration Operation Completion Stage: The configuration system CS receives the read transaction request data, uses the configuration CS system to issue configuration information, completes the configuration operation of the industrial equipment, and packages the configuration operation information onto the blockchain after the operation.

[0014] Furthermore, S1 specifically includes the following steps:

[0015] S11: First, configure the system CS to randomly select a base field GF(p), where p is a prime number greater than 3, indicating that there are p elements in the base field; then configure the system to randomly select a and b within the base field GF(p) that satisfy 4a 3 +27b 2 ≠0, thus the elliptic curve on this base domain satisfies the elliptic curve E p (a,b):y 2 =x 3 +ax+b(modq), then configure the system to randomly select a base point G∈(x) of order N on the elliptic curve. G ,y G ), where N is a prime number satisfying N·G=O, and G is broadcast throughout the architecture; then the system is configured to generate a random number as its private key S. CS And calculate the public key P of the configuration system. CS =S CS ·G, denoted as public key P CS And will give public key P CS Public, private key S CS Saved by the configuration system CS;

[0016] S12: The consortium blockchain network selects master and slave nodes based on a consensus algorithm; the consortium blockchain generates a random number as the private key S of the master node. PN And calculate the public key P of the master node. PN =S PN ·G, denoted as public key P PN and the public key P PN Public; simultaneously, a public key P is generated from the node. RN and private key SRN , public key P RN In this system, both master and slave nodes publicly disclose their public keys as their identity identifiers, while their private keys are stored separately by the master and slave nodes. All consensus nodes are configured into a blockchain network through a P2P network, and each node obtains its permission list through the IPFS private network.

[0017] S13: The key server generates its own public key P KS and private key S KS , public key P KS The private key is publicly available; the private key is stored by a key server.

[0018] S14: The master node determines the industrial equipment that users can access and the operations they are allowed to perform, formulates access control policies, and identifies all industrial equipment Internet Explorers (IEs), referring to them as devices. Create a user permission table;

[0019] S15: Configure the system CS to record the initial state of the industrial equipment before IE configuration, and set the equipment... The initial state (Previous Status) before configuration is packaged and written onto the blockchain into the genesis block of the configuration operation chain.

[0020] Furthermore, S2 specifically includes the following steps:

[0021] S21: The client sends an identity registration request:

[0022] When a user needs to register their identity, the client will identify the user. The user registration request (req1) and timestamp (TimeStamp1) are packaged together and the public key (P) of the registration authority (RA) is used. RA After encryption, the message is sent to the audit and registration authority (RA), which is then encrypted to obtain the user's identity registration request message ms1.

[0023]

[0024] S22: The RA (Registry Authorities) verifies the identity registration request message. ms1: Upon receiving ms1, the RA uses S... RAAfter decryption, the timestamp TimeStamp1 is obtained. Then, the Registry Authorities (RA) checks if the timestamp TimeStamp1 of the user's registration request message is within its validity period. If TimeStamp1 - TimeStamp'1 ≤ ΔT, this is invalid. TimeStamp'1 is the timestamp at which the RA receives ms1, and ΔT represents the valid time difference between the time the RA receives the registration request message and the time the User generates the registration request message. If the inequality does not fall within the valid time difference range, it indicates that message ms1 is invalid, and the RA directly returns a rejection response. If the inequality falls within the valid time difference range, it indicates that message ms1 is valid, and the RA continues to check the user's identity. Perform the following steps;

[0025] S23: After the Registry Authority (RA) verifies the validity of message ms1, it receives the user's registration request req1 and then checks whether the user's identity information has been registered before. If registered, the registration process stops; otherwise, the RA generates a public key for the user. and private key After calculating the user's public and private key pair, the registration authority (RA) first... Perform a hash calculation to obtain the hash value. Then use RA's private key S RA Sign h1 to obtain Then Pack the timestamp (TimeStamp2) into a message (ms2) and return it to the user.

[0026]

[0027] S24: Upon receiving ms2, the client first checks if the message is valid. If the message has expired, it is discarded, and the registration request is resent. If the message is valid, the client uses RA's public key P. RA Perform signature verification on message ms2, and then use the obtained user public key. Private key Perform a hash calculation to obtain the hash value. If h2 = h1, then verify The sender is the Registration Authority (RA), to prevent malicious nodes impersonating RAs; this signifies that the user's registration request was successful and the user has obtained their public / private key pair, and will then share the public key. Public, private key Saved by the user.

[0028] Furthermore, S3 specifically includes the following steps:

[0029] S31: The auditing registration authority (RA) uses its own private key S RA Decrypt the identity registration request message ms1 to obtain the user's identity identifier. The user registration request includes req1 and a timestamp TimeStamp1, which are then used to generate the user's public key. and private key Then use RA's private key pair Perform a hash calculation to obtain the hash value. RA uses its private key S CA Perform elliptic curve digital signature on h3 to obtain the elliptic curve digital signature. The Registration Authority (RA) packages the data into a message (ms3) and submits the ms3 to the Certificate Authority (CA).

[0030]

[0031] S32: Upon receiving message ms3, the Certificate Authority (CA) verifies its trustworthiness to prevent malicious attackers from impersonating the CA. First, the CA checks the timestamp of the received ms3 message to ensure it is valid. If the timestamp has expired, the message is discarded, and the registration request is resent. If the timestamp is valid, the CA obtains the ms3 message and signs it to verify the integrity and authenticity of the user's identity information. The CA also verifies the user's public key. Private key User Identity Authentication Perform a hash calculation to obtain the hash value. It then checks if h4 and h3 are equal; if they are equal, the verification passes. The sender is the Registration Authority (RA), and the message has not been tampered with. The CA then verifies the user's identity using the provided information. If authentication is successful, the user's identity verification is complete; otherwise, the user is considered legitimate, and the process ends immediately. After successful user authentication, the CA issues a Digital Certificate containing the user's public key and identity information. The Certificate Authority (CA) uses its private key S... CA User public key User Identity Authentication Pack it together with the timestamp TimeStamp1 to get Perform elliptic curve digital signature on ms4 to obtain the digital signature. Authoritative Certificate Authorities (CAs) publish the digital certificates they issue to public certificate repositories so that other users can obtain and verify the validity of the Digital Certificate; and key servers store users' public and private key pairs to prevent users from losing their certificates and to allow them to recover their public and private key pairs.

[0032] S33: Dynamic key generation stage, which includes the following steps:

[0033] S331: The user terminal and the key server connect via TCP, i.e., the user terminal sends a TCP connection request to the key server; the key server responds to the user terminal's TCP connection request, thus establishing a successful connection between the key server and the user terminal; the user terminal requests the key server's public key, and the key server provides the public key P. KS Send to the user terminal, the user terminal uses the public key P KS Save the private key S KS The key is stored by the key server; the user also needs to generate a configuration operation request req2, which the user then uses to configure the key according to their own public key. The current timestamp (TimeStamp3) and the fixed string (Strings1) are bundled together to form a new string on the user's end. The new string NewStrings1 will be passed through the key server's public key P. KS Encryption is performed using a dynamic key, Dynamic Key1, to ensure the integrity and consistency of transmitted information; then, Dynamic Key1 is sent to the key server.

[0034] S332: The key server receives the dynamic key Dynamic Key1 and uses the private key S... KS The decryption operation is performed, and then the dynamic key Dynamic Key1 is verified. If the timestamp has not expired, it proves that the dynamic key Dynamic Key1 is valid. The timestamp is then extracted, and the key server uses the user's public key... The current timestamp (TimeStamp2) and the fixed string (Strings1) are bundled together to form a new string on the user's end. And pass the new string NewStrings2 through the key server's public key P KS Encryption is performed using a dynamic key, Dynamic Key2, resulting in the same dynamic key as the user's Dynamic Key2 = Dynamic Key1.

[0035] S333: After generating the dynamic key Dynamic Key1, the user terminal encrypts the configuration operation request req2 using the dynamic key Dynamic Key1, forming encrypted configuration operation request information. And Send to the key server; the key server receives the configuration operation request information. First, decryption is performed using the dynamic key (Dynamic Key2), then the message is verified, and if the configuration operation request information is available... If the timestamp has not expired, it means that the dynamic key generated by the user after identity authentication is returned to the user and the configuration operation request req2 is obtained.

[0036] S34: After generating the dynamic key, the Certificate Authority (CA) packages the user's identity registration request message ms1 and the dynamic key into ms5 = (ms1||Dynamic Key1), and packages ms5 into a block. A The data is recorded in the ledger of the consortium blockchain, forming a series of connected consortium blockchain blocks. This enables the user's identity information data to be uploaded to the blockchain, forming a user information data chain, and enabling the auditing and traceability of user identity information.

[0037] Furthermore, S4 specifically includes the following steps:

[0038] S41: The key server will transfer the user's public key. User private key Equipment that needs to be configured The configuration operation request req2, the dynamic key Dynamic Key1, and the current timestamp TimeStamp3 are used to perform a hash calculation to obtain a hash value. The key server then uses its own private key S KS Elliptic curve digital signature of h5 is obtained Then Packaged with the current timestamp (TimeStamp3), it is used as a configuration transaction request. Finally, Trans KS Send to the master node;

[0039]

[0040] S42: The master node receives the configuration transaction request Trans. KS Then, verify Trans. KS Whether it is reliable, to prevent malicious attacks using forged dynamic keys; specifically including: master node pair Perform a hash calculation to obtain the hash value. If h6 = h5, then the verification passes, and the Trans is verified. KS The sender is a key server, preventing malicious attackers from impersonating the key server; configure the transaction request Trans KS After passing, the master node will Trans KSIn Once placed in the transaction pool, the master and slave nodes enter the transaction information verification phase;

[0041] S43: The master node generates and broadcasts transaction information, which includes the following steps:

[0042] S431: The master node retrieves the configuration request initiated by the user from the transaction pool. right Perform a hash calculation to obtain the hash value. The master node obtains the user's public key from the transaction pool. Master node use Asymmetric encryption is performed on h7 to obtain The master node then uses the slave node's public key P RN right and Elliptic curve encryption is performed to obtain... get The master node will and T TS This transaction information is broadcast to the slave nodes and recorded as a block. Where T TS Indicates the timestamp of the configuration transaction information in this round;

[0043] S432: The slave node receives the block Trans broadcast by the master node. PN Then, the slave node performs a transaction on the Trans process. PN Verification is performed to ensure the authenticity of the configuration transaction information; firstly, the node uses its own private key S RN In the configuration transaction information Perform elliptic curve decryption to obtain The node uses the user's private key S U right Decrypt using an asymmetric decryption method. If decryption is successful, it indicates that this identity registration information was initiated by a legitimate user; from the node pair Perform a hash calculation to obtain If h8 = h7, then prove... It has not been tampered with; after the slave node confirms that the sender of the configuration transaction information is the master node and that the configuration transaction information is reliable, the slave node verifies the T in the configuration transaction information. TS Whether it is within the validity period, record the verification timestamp T. TS The time is T ts Assume the validity period is T. t If T ts -T TS ≤T t The transaction information is therefore considered to have a time limit.

[0044] S433: If, after the timeliness verification of the slave node is qualified, there are more than [a certain number of nodes], [the following applies]. If the slave nodes reach a consensus on the configuration transaction information, then the verification of the authenticity of the configuration transaction information is successful. This also indicates that the slave nodes have determined that the user's identity authentication is successful, meaning that the configuration operation request initiated by the user is legitimate. This is denoted as... Conversely, if the terminal device authentication fails, it is recorded as... After successfully verifying the configuration transaction information initiated by the user, the master node uses the public key P of the configuration system. CS Transaction configuration request Trans KS Perform elliptic curve cryptography to configure transaction request messages Then it is sent to the configuration system for configuration operations.

[0045] Furthermore, S5 specifically includes the following steps:

[0046] S51: First, configure the system to use the public key P CS The shared key (SharedKey) is then passed to the master node PN and calculated. PN =S PN ·P CS , recorded as SharedKey PN Subsequently, the master node PN also sends the public key P PN The shared key (SharedKey) is passed to the configuration system and calculated. CS =S CS ·P PN ;

[0047] S52: The configuration system CS receives a configuration transaction request message. Then use your private key S CS After performing the decryption operation and obtaining the timestamp, the configuration system checks whether the configuration request message is within the valid time. If it is valid, the device to be configured is obtained. Configure the operation request req2 and the dynamic key, and configure the system CS to request the corresponding device from the master node. The account information is packaged and sent to the master node as a request for device account information. Where q represents the content requesting the corresponding device account information, and t req For timestamps, To configure the device's identity, the Request contains the request message content m and the message digest d;

[0048] S53: The master node receives the request message req CS Then, first check the request information req. CS Is it within the validity period? If the request information is reqCS Requests that have expired will be discarded. CS And return an access denied response; if the request information is req CS If it has not expired, the device identifier that needs to be configured will be obtained. Device account Device account password Package the above device information into device account information. Then use the shared key in MS6. PN Encryption And send it to the configuration system CS; after receiving the encrypted device account information returned by the target node, the configuration system uses the configuration system's shared key SharedKey CS Decrypting the encrypted information yields the device's account information (ms6), which is the configuration information obtained from the system CS.

[0049] S54: After obtaining the device's account information, the configuration system CS logs into the corresponding target device and completes the configuration operations in the industrial device IE line by line according to the received configuration operation request req2. After completing the configuration operations, it records the current device end status, disconnects from the industrial device IE, and logs out. It then packages the device IDEi, configuration operation request req2, dynamic key1, and device end status into a block. A The configuration operation data is recorded in the ledger of the consortium blockchain, thus enabling the configuration operation to be uploaded to the blockchain and forming the configuration operation chain.

[0050] The beneficial effects of this invention are as follows: Traditional industrial equipment configuration systems still have shortcomings in data security, user privacy protection, and access control. Therefore, to address these issues, this solution uses a dual-chain architecture to achieve two layers of protection. First, the user information data chain forms the first layer of protection, authenticating the user's identity. Those who fail authentication will not be able to proceed with subsequent configuration operations, and their information data will not be packaged and uploaded to the chain. Then, the configuration operation chain forms the second layer of protection, controlling the user's access to configuration requests. Through consortium blockchain consensus, it is determined whether the user meets the required configuration operation permissions before proceeding, and this process is then packaged and uploaded to the chain.

[0051] Other advantages, objectives, and features of the invention will be set forth in part in the description which follows, and in part will be apparent to those skilled in the art from the following examination, or may be learned from practice of the invention. The objectives and other advantages of the invention can be realized and obtained through the following description. Attached Figure Description

[0052] To make the objectives, technical solutions, and advantages of the present invention clearer, the preferred embodiments of the present invention will be described in detail below with reference to the accompanying drawings, wherein:

[0053] Figure 1 This is a configuration architecture diagram for industrial equipment based on a dual-chain architecture.

[0054] Figure 2 This is a diagram of a two-chain architecture;

[0055] Figure 3 This is a bichain relationship diagram;

[0056] Figure 4 This is a flowchart of the steps.

[0057] Figure 5 Flowchart for generating dynamic key stages;

[0058] Figure 6 Flowchart of the user authentication process;

[0059] Figure 7 This is a flowchart of the consensus phase of a consortium blockchain network. Detailed Implementation

[0060] The following specific examples illustrate the implementation of the present invention. Those skilled in the art can easily understand other advantages and effects of the present invention from the content disclosed in this specification. The present invention can also be implemented or applied through other different specific embodiments, and various details in this specification can be modified or changed based on different viewpoints and applications without departing from the spirit of the present invention. It should be noted that the illustrations provided in the following embodiments are only schematic representations of the basic concept of the present invention. Unless otherwise specified, the following embodiments and features can be combined with each other.

[0061] The accompanying drawings are for illustrative purposes only and are schematic diagrams, not actual pictures. They should not be construed as limiting the invention. To better illustrate the embodiments of the invention, some parts in the drawings may be omitted, enlarged, or reduced, and do not represent the actual product dimensions. It is understandable to those skilled in the art that some well-known structures and their descriptions may be omitted in the drawings.

[0062] In the accompanying drawings of the embodiments of the present invention, the same or similar reference numerals correspond to the same or similar components. In the description of the present invention, it should be understood that if terms such as "upper," "lower," "left," "right," "front," and "rear" indicate the orientation or positional relationship based on the orientation or positional relationship shown in the drawings, they are only for the convenience of describing the present invention and simplifying the description, and do not indicate or imply that the device or element referred to must have a specific orientation, or be constructed and operated in a specific orientation. Therefore, the terms used to describe positional relationships in the drawings are only for illustrative purposes and should not be construed as limiting the present invention. For those skilled in the art, the specific meaning of the above terms can be understood according to the specific circumstances.

[0063] 1. Architecture Design

[0064] This embodiment provides an industrial equipment configuration architecture based on a dual-chain architecture, such as... Figure 1 As shown, the architecture is divided into three layers: a user layer, a control layer, and a device layer, which serve from top to bottom. The control layer is the central layer and interacts with the user layer and the device layer.

[0065] The user layer includes the user-end computers used for user identity registration and providing a visual user interface. Users are responsible for initiating configuration requests and configuring various industrial devices in the device layer. They can also directly access network status information and configuration process data.

[0066] The control plane primarily consists of an identity authentication mechanism, a consortium blockchain network, and a configuration system. The identity authentication mechanism includes a Registration Authority (RA), a Certificate Authority (CA), and a Key Server (KS). The RA is responsible for reviewing user application information, including applications from individuals and organizations, maintaining the review results, and submitting approved applications to the CA. The CA is a trusted entity responsible for issuing digital certificates; verifying that an entity is the one it claims to be requires an independent third-party institution. The KS is used to store and distribute keys for encrypted communication or other secure operations. Its main function is to provide key management services, including key generation, storage, distribution, and revocation. The consortium blockchain is mapped from the configuration system server of the control layer after installing the consortium blockchain client. This consortium blockchain network has only one master node and multiple slave nodes. All nodes in the consortium blockchain network are consensus nodes (CONN), responsible for participating in the consensus algorithm, and can be divided into primary nodes (PN) and replica nodes (RN). The configuration system (CS) is a system used to read configuration transaction requests initiated by users, issue configuration requests, and execute configuration operations according to the configuration requests.

[0067] The device layer can be divided into network devices and field devices. Network devices include industrial wireless routers and industrial wireless gateways; field devices include programmable logic controllers (PLCs), field wireless nodes, and sensors. Field devices, field wireless nodes, and industrial wireless routers refer to devices that transmit data in the industrial wireless network, while industrial wireless gateways are used to aggregate and forward business data. In this solution, all of them are referred to as industrial equipment (IE). Figure 1 This is a configuration architecture diagram for industrial equipment based on a dual-chain architecture.

[0068] 2. Configuration method for industrial equipment with dual-chain architecture

[0069] 2.1 Overview

[0070] Blockchain technology features decentralization, immutability, and end-to-end data traceability. Traditional industrial equipment configuration systems mostly employ a single-chain structure, packaging configuration data into blocks to ensure data security and privacy. However, single-chain structures suffer from difficulties in user and configuration data management, long data retrieval times, and cumbersome configuration operation traceability, significantly limiting the security and interactivity of user information and configuration data during the configuration process. This paper aims to provide an industrial equipment configuration method based on a dual-chain architecture, effectively addressing the problems associated with single-chain systems.

[0071] This method employs a dual-chain structure. One chain is the user information data chain, responsible for recording and storing user personal information data, user-participated identity authentication, and key issuance operations, ensuring user data privacy, integrity, and security. The other chain is the configuration operation chain, responsible for recording the user's configuration operation process on the industrial equipment and recording the state of the industrial equipment before and after configuration. This solves problems such as difficulty in tracing anomalies during configuration operations and difficulty in identifying dangerous operations. Figure 2 This is a diagram of a two-chain architecture.

[0072] In this method, the two-chain architecture is interconnected through dynamic keys generated after user authentication. These dynamic keys are fed back to the two chains, establishing an interoperability mechanism between the user information data chain and the configuration operation chain. This two-chain method is primarily applied to industrial equipment configuration scenarios, overcoming the problems of traditional single-chain structures, such as untraceable data operations and low data query efficiency. The two-chain relationship is as follows: Figure 3 As shown.

[0073] By adopting a dual-chain architecture, problems such as single points of failure in traditional configuration architectures can be avoided. User personal data and configuration operation data are stored separately, ensuring user data privacy, integrity, and security. Furthermore, when configuration errors occur, the dual-chain architecture allows for timely tracing of the cause, guaranteeing system security and stability, thus achieving two layers of protection for the industrial equipment configuration process. The design steps are as follows: Figure 4 As shown in Table 1. Table 1 provides an explanation of the relevant symbols used in this scheme.

[0074] Table 1

[0075]

[0076] 2.2 Specific Method Design

[0077] The implementation steps of a dual-chain architecture industrial equipment configuration method are as follows:

[0078] Step 1: Initialization Phase: Configure the system server to install the consortium blockchain client. The consortium blockchain network selects master and slave nodes according to the consensus algorithm. The master node determines the industrial devices that each system user can access and the operations that can be configured. The configuration system CS records the previous status of the industrial devices before IE configuration and assigns a number to each industrial device IE, referring to it as a device. Put the equipment The initial state is written into the genesis block.

[0079] Step one is explained in detail below:

[0080] (1) First, configure the system CS to randomly select a base field GF(p), where p is a prime number greater than 3, indicating that there are p elements in the base field; then configure the system to randomly select a and b in the base field GF(p) to satisfy 4a 3 +27b 2 ≠0, thus the elliptic curve on this base domain satisfies the elliptic curve E p (a,b):y 2 =x 3 +ax+b(modq), then configure the system to randomly select a base point G∈(x) of order N on the elliptic curve. G ,y G ), where N is a prime number satisfying N·G=O, and G is broadcast throughout the architecture. Then, the system is configured to generate a random number as its private key S. CS And calculate the public key P of the configuration system. CS =S CS ·G, denoted as public key P CS And will give public key P CS Public, private key S CS Saved by the configuration system CS.

[0081] (2) The consortium blockchain network selects master and slave nodes based on a consensus algorithm. The consortium blockchain generates a random number as the private key S of the master node. PN And calculate the public key P of the master node. PN =S PN ·G, denoted as public key P PN and the public key P PN Public. Simultaneously, a public key P is generated from the node. RN and private key S RN , public key P RN In this public blockchain, both master and slave nodes publicly disclose their public keys as their identity identifiers, while their private keys are stored separately by the master and slave nodes, respectively. All consensus nodes are configured into a blockchain network via a P2P network, and each node obtains its access list through the IPFS private network.

[0082] (3) The key server generates its own public key P.KS and private key S KS , public key P KS The private key is publicly available, but is stored by a key server.

[0083] (4) The master node determines the industrial equipment that users can access and the operations they are allowed to perform, formulates access control policies, and identifies all industrial equipment Internet Explorers (IEs), referred to as devices. Create a user permission table.

[0084] (5) Configure the system CS to record the initial state of the industrial equipment before IE configuration, and set the equipment... The initial state (Previous Status) before configuration is packaged and written onto the blockchain into the genesis block of the configuration operation chain.

[0085] Step Two: User Registration Completed: Users enter their identity information to register, obtain their user identity account, and send the identity registration request message and timestamp to the review and registration agency RA.

[0086] Step two is explained in detail below:

[0087] The client sends an identity registration request:

[0088] (1) When a user needs to register their identity, the client will identify the user. The user registration request (req1) and timestamp (TimeStamp1) are packaged together and the public key (P) of the registration authority (RA) is used. RA After encryption, the message is sent to the audit and registration authority (RA), which then encrypts it to obtain the user's identity registration request message ms1.

[0089]

[0090] (2) The RA verifies the identity registration request message ms1: After receiving ms1, the RA uses S... RA After decryption, the timestamp TimeStamp1 is obtained. Then, the Registration Authority (RA) checks if the timestamp TimeStamp1 of the user's registration request message is within its validity period. If TimeStamp1 - TimeStamp'1 ≤ ΔT, this is invalid. TimeStamp'1 is the timestamp at which the RA receives ms1, and ΔT represents the valid time difference between the time the RA receives the registration request message and the time the User generates the registration request message. If the inequality does not fall within the valid time difference range, it means the message ms1 is invalid, and the RA directly returns a rejection response. If the inequality falls within the valid time difference range, it means the message ms1 is valid, and the RA continues to check the user's identity. Proceed to the next steps.

[0091] (3) After the RA verifies the validity of the ms1 message, the RA obtains the user's registration request req1 and then checks whether the user's identity information has been registered before. If it has been registered before, the registration process stops; otherwise, the RA generates a public key for the user. and private key After calculating the user's public and private key pair, the registration authority (RA) first... Perform a hash calculation to obtain the hash value. Then use RA's private key S RA Sign h1 to obtain Then The timestamp (TimeStamp2) is packaged into a message (ms2) and returned to the client.

[0092]

[0093] (4) Upon receiving ms2, the client first checks if the message is within its validity period. If the message has expired, it discards the message and resends the registration request; if it is valid, the client uses RA's public key P. RA Perform signature verification on message ms2, and then use the obtained user public key. Private key Perform a hash calculation to obtain the hash value. If h2 = h1, then verify The sender is the Registration Authority (RA), which verifies and registers the user's account to prevent malicious nodes from impersonating RAs. This signifies that the user's registration request was successful and the user has obtained their public / private key pair, and will then share the public key with the RA. Public, private key Saved by the user.

[0094] Step 3: User Identity Authentication Stage: After registration, the Registration Authority (RA) reviews the received user registration information. Once approved, the information is submitted to the Certificate Authority (CA) for identity authentication. After successful authentication, the CA issues a Digital Signature Certificate (Digital Cert) to the user and the key server generates a dynamic key to package the user information data onto the blockchain.

[0095] Step 3 is explained in detail below:

[0096] (1) The auditing and registration authority RA uses its own private key S RA Decrypt the identity registration request message ms1 to obtain the user's identity identifier. The user registration request includes req1 and a timestamp TimeStamp1, which are then used to generate the user's public key. and private key Then use RA's private key pair Perform a hash calculation to obtain the hash value. RA uses its private key S CA Perform elliptic curve digital signature on h3 to obtain the elliptic curve digital signature. The Registration Authority (RA) packages the data into a message ms3 and submits the ms3 to the Certificate Authority (CA).

[0097]

[0098] (2) Upon receiving the ms3 message, the Certificate Authority (CA) verifies its trustworthiness to prevent malicious attackers from impersonating the CA and launching attacks. First, the CA checks the timestamp of the received ms3 message to ensure it is within its validity period. If the timestamp has expired, the message is discarded, and the registration request is resent. If the timestamp is valid, the CA obtains the ms3 message and signs it to verify the integrity and authenticity of the user's identity information. The CA also verifies the user's public key. Private key User Identity Authentication Perform a hash calculation to obtain the hash value. It then checks if h4 and h3 are equal; if they are equal, the verification passes. The sender is the Registration Authority (RA), and the message has not been tampered with. The CA then verifies the user's identity using the provided information. If authentication is successful, the user's identity verification is complete; otherwise, the user is considered legitimate, and the process ends immediately. After successful user authentication, the CA issues a digital certificate (Digital Certificate) containing the user's public key and identity information. The Certificate Authority (CA) uses its private key (S) to... CA User public key User Identity Authentication Pack it together with the timestamp TimeStano1 to get Perform elliptic curve digital signature on ms4 to obtain the digital signature. Authoritative Certificate Authorities (CAs) publish their issued digital certificates in public certificate repositories so that other users can obtain and verify the validity of the Digital Certificate. Furthermore, key servers store users' public and private key pairs to allow for recovery should a certificate be lost.

[0099] (3) Dynamic key generation stage, which includes the following steps:

[0100] a. The user client and the key server connect via TCP, i.e., the user client sends a TCP connection request to the key server; the key server responds to the user client's TCP connection request, thus establishing a successful connection between the key server and the user client. The user client requests the key server's public key, and the key server sends the public key P... KS Send to the user terminal, the user terminal uses the public key P KS Save the private key S KS The key is stored by the key server. The client also needs to generate a configuration operation request (req2), which the client uses based on its public key. The current timestamp (TimeStamp3) and the fixed string (Strings1) are bundled together to form a new string on the user's end. The new string NewStrings1 will be passed through the key server's public key P. KS Encryption is performed using a dynamic key (Dynamic Key1) to ensure the integrity and consistency of transmitted information. Then, the dynamic key (Dynamic Key1) is sent to the key server.

[0101] b. The key server receives the dynamic key Dynamic Key1 and uses the private key S KS The decryption operation is performed, and then the dynamic key Dynamic Key1 is verified. If the timestamp has not expired, it proves that the dynamic key Dynamic Key1 is valid. The timestamp is then extracted, and the key server uses the user's public key... The current timestamp (TimeStamp2) and the fixed string (Strings1) are bundled together to form a new string on the user's end. And pass the new string NewStrings2 through the key server's public key P KS Encryption is performed using a dynamic key, Dynamic Key2, resulting in the same dynamic key as the user's Dynamic Key2 = Dynamic Key1. The process is as follows: Figure 5 As shown.

[0102] c. After generating the dynamic key Dynamic Key1, the user client encrypts the configuration operation request req2 using Dynamic Key1, thus forming the encrypted configuration operation request information. And Send to the key server. The key server receives the configuration operation request information. First, decryption is performed using the dynamic key DynamicKey2, then the message is verified, and if the configuration operation request information is available... If the timestamp has not expired, it indicates that the response was generated by a dynamic key from a authenticated user and returned to the client, obtaining the configuration operation request req2. Figure 6As shown.

[0103] (4) After generating the dynamic key, the Certificate Authority (CA) packages the user's identity registration request message ms1 and the dynamic key into ms5 = (ms1||Dynamic Key1), and packages ms5 into a block. A The data is recorded in the ledger of the consortium blockchain, forming a series of connected consortium blockchain blocks. This enables the user's identity information data to be uploaded to the blockchain, forming a user information data chain, thereby enabling the auditing and traceability of user identity information.

[0104] Step 4: Consensus Phase of Consortium Blockchain Network: The master node receives the configuration transaction request and broadcasts it to the slave nodes; the consensus network performs consensus judgment on the configuration transaction request data, and if a consensus is reached, the transaction request is sent to the configuration system CS.

[0105] Step four is explained in detail below:

[0106] (1) The key server will store the user's public key. User private key Equipment that needs to be configured The configuration operation request req2, the dynamic key Dynamic Key1, and the current timestamp TimeStamp3 are used to perform a hash calculation to obtain a hash value. The key server then uses its own private key S KS Elliptic curve digital signature of h5 is obtained Then Packaged with the current timestamp (TimeStamp3), it is used as a configuration transaction request. Finally, Trans KS Send to the master node.

[0107]

[0108] (2) The master node receives the configuration transaction request Trans KS Then, verify Trans. KS Whether it is reliable, to prevent malicious attacks using forged dynamic keys; specifically including: master node pair Perform a hash calculation to obtain the hash value. If h6 = h5, then the verification passes, and the Trans is verified. KS The sender is a key server, preventing malicious attackers from impersonating the key server. Configure the transaction request (Trans). KS After passing, the master node will Trans KS In Once placed in the transaction pool, the master and slave nodes enter the transaction information verification phase.

[0109] (3) The master node generates and broadcasts transaction information, which includes the following steps:

[0110] a. The master node retrieves the configuration request initiated by the user from the transaction pool. right Perform a hash calculation to obtain the hash value. The master node obtains the user's public key from the transaction pool. Master node use Asymmetric encryption is performed on h7 to obtain The master node then uses the slave node's public key. right and Elliptic curve encryption is performed to obtain... ,get The master node will and T TS This transaction information is broadcast to the slave nodes and recorded as a block. Where T TS This indicates the timestamp of the configuration transaction information for this round.

[0111] b. The slave node receives the block Trans broadcast by the master node. PN Then, the slave node performs a transaction on the Trans process. PN Verification is performed to ensure the authenticity of the configuration transaction information. First, the node uses its private key S... RN In the configuration transaction information Perform elliptic curve decryption to obtain The node uses the user's private key S U right Decrypt using an asymmetric decryption method. If decryption is successful, it indicates that the identity registration information was initiated by a legitimate user. (From node pair) Perform a hash calculation to obtain If h8 = h7, then it can be proven that... It has not been tampered with. After the slave node confirms that the sender of the configuration transaction information is the master node and that the configuration transaction information is reliable, the slave node verifies the T in the configuration transaction information. TS Whether it is within the validity period, record the verification timestamp T. TS The time is T ts Assume the validity period is T. t If T ts -T TS ≤T t The transaction information is therefore considered to be time-sensitive.

[0112] c. If, after the node passes the timeliness verification, there are more than [a certain number of nodes]... If the slave nodes reach a consensus on the configuration transaction information, then the verification of the authenticity of the configuration transaction information is successful. This also indicates that the slave nodes have determined that the user's identity authentication is successful, meaning that the configuration operation request initiated by the user is legitimate. This is denoted as... Conversely, if the terminal device authentication fails, it is recorded as... After successfully verifying the configuration transaction information initiated by the user, the master node uses the public key P of the configuration system. CS Transaction configuration request Trans KS Perform elliptic curve cryptography to configure transaction request messages Then it is sent to the configuration system for configuration operations, such as Figure 7 As shown.

[0113] Step 5: Complete the configuration operation stage: The configuration system CS receives the read transaction request data, uses the configuration CS system to issue configuration information, completes the configuration operation of the industrial equipment, and packages the configuration operation information onto the blockchain after the operation.

[0114] Step 5 is explained in detail below:

[0115] (1) First, configure the system to use the public key P CS The shared key (SharedKey) is then passed to the master node PN and calculated. PN =S PN ·P CS , recorded as SharedKey PN Subsequently, the master node PN also sends the public key P. PN The shared key (SharedKey) is passed to the configuration system and calculated. CS =S CS ·P PN .

[0116] (2) When the configuration system CS receives the configuration transaction request message Then use your private key S CS After performing the decryption operation and obtaining the timestamp, the configuration system checks whether the configuration request message is within the valid time. If it is valid, the device to be configured is obtained. Configure the operation request req2 and the dynamic key, and configure the system CS to request the corresponding device from the master node. The account information is packaged and sent to the master node as a request for device account information. Where q represents the content requesting the corresponding device account information, and t req For timestamps, To configure the device's identity, the Request contains the request message content m and the message digest d.

[0117] (3) When the master node receives the request message req CS Then, first check the request information req. CS Is it within the validity period? If the request information is req CS Requests that have expired will be discarded. CS And return an access denied response; if the request information is req CS If it has not expired, the device identifier that needs to be configured can be obtained. Device account Device account password Package the above device information into device account information. Then use the shared key in MS6. PN Encryption And send it to the configuration system CS. After receiving the encrypted device account information returned by the target node, the configuration system uses the configuration system's shared key SharedKey. CS Decrypting the encrypted information reveals the device's account information (ms6), which can be obtained by configuring the system CS.

[0118] (4) After obtaining the device's account information, the configuration system CS logs into the corresponding target device and completes the configuration operations in the industrial device IE line by line according to the received configuration operation request req2. After completing the configuration operations, it records the current device end status, disconnects from the industrial device IE, and logs out. The device... The configuration operation request req2, dynamic key 1, device end status, and other data are packaged into a block. A The configuration operation data is recorded in the ledger of the consortium blockchain, thus enabling the configuration operation to be uploaded to the blockchain and forming the configuration operation chain.

[0119] 3. Case Analysis

[0120] (I) User Information Data Chain Uplink Process

[0121] User A first registers by entering their personal information. User A then identifies themselves. The user registration request (req1) and timestamp (TimeStamp1) are packaged together and the public key (P) of the registration authority (RA) is used. RA After encryption, it is sent as an identity registration request message ms1 to the auditing and registration authority (RA).

[0122] After the registration authority (RA) receives MS1, it uses S RAAfter decryption, the timestamp TimeStamp1 is obtained. Then, the Registry Authority (RA) checks if the timestamp TimeStamp1 of the user's registration request message is valid. If the timestamp is found to be valid, user A's registration request is confirmed to be valid, meaning message ms1 is valid. After verifying the validity of message ms1, the RA obtains the user's registration request req1 and continues to check the user's identity information. If the check confirms that user A's identity has not been registered before, the RA generates a public key for the user. and private key After calculating the user's public and private key pair, RA first... Perform a hash calculation to obtain the hash value. Then use RA's private key S RA Sign h1 to obtain Then The timestamp (TimeStamp2) is packaged into a message (ms2) and returned to the client.

[0123] Upon receiving ms2, the client first checks if the message is within its validity period. If the check confirms that user A's message is valid, then user A uses RA's public key P. RA Perform signature verification on message ms2 to confirm. The sender is the Registration Authority (RA). This means that User A's registration request was successful and User A has obtained their own public and private key pair, and will share the public key... Public, private key Saved by the user.

[0124] RA uses its own private key S RA Decrypt the identity registration request message ms1 to obtain the user's identity identifier. The user registration request (req1) and timestamp (TimeStamp1) are then used to generate the user's public key. and private key Then use RA's private key pair Perform a hash calculation to obtain the hash value. RA uses its private key S CA Perform elliptic curve digital signature on h3 to obtain the elliptic curve digital signature sigS RA {h3}. The Registration Authority (RA) packages the relevant information into a message (ms3) and submits the ms3 to the Certificate Authority (CA).

[0125] After receiving message ms3, the CA verifies that the timestamp of ms3 is within the validity period. The CA then authorizes the user... Perform a hash calculation to obtain the hash value. And determine that h4 and h3 are equal; if they are equal, it means... The sender is the Registration Authority (RA), and the message has not been tampered with. The CA then verifies the identity of user A using the information provided, confirming user A's legitimacy. After successful authentication, the CA issues a digital certificate (Digital Certificate) containing the user's public key and identity information. The CA then transfers the user's identity to the CA. Pack it together with the timestamp TimeStamp1 to get And using its own private key S CA Perform elliptic curve digital signature on ms4 to obtain the digital signature. Authoritative Certificate Authorities (CAs) publish the digital certificates they issue to public certificate repositories so that other users can obtain and verify the validity of the Digital Certificate.

[0126] The client and the key server connect via TCP, specifically by the client sending a TCP connection request to the key server. The key server responds to the client's TCP connection request, thus establishing a successful connection. The client requests the key server's public key, and the key server then sends the public key P... KS Send to the user terminal, the user terminal uses the public key P KS Save the private key S KS The key is stored by the key server. The client also needs to generate a configuration operation request (req2), which the client uses based on its public key. The current timestamp (TimeStamp3) and the fixed string (Strings1) are bundled together to form a new string on the user's end. The new string NewStrings1 will be passed through the key server's public key P. KS Encryption is performed using a dynamic key (Dynamic Key1) to ensure the integrity and consistency of transmitted information. Then, the dynamic key (Dynamic Key1) is sent to the key server.

[0127] The key server receives the dynamic key Dynamic Key1 and uses the private key S KS Perform decryption, then verify the dynamic key Dynamic Key1. First, verify that the timestamp has not expired, then extract the timestamp. The key server then uses the user's public key... The current timestamp (TimeStamp2) and the fixed string (Strings1) are bundled together to form a new string on the user's end. And pass the new string NewStrings2 through the key server's public key P KS Encryption is performed using a dynamic key, Dynamic Key2, resulting in the same dynamic key as the user's Dynamic Key2 = Dynamic Key1.

[0128] After generating the dynamic key Dynamic Key1, the user client encrypts the configuration operation request req2 using Dynamic Key1, thus forming the encrypted configuration operation request information. And Send to the key server. The key server receives the configuration operation request information. First, the dynamic key DynamicKey2 is used for decryption. Then, the message is verified and the timestamp is found to be valid. If the timestamp is not expired, it means that the dynamic key was generated by the user who has passed the identity authentication. A response is then returned to the user and the configuration operation request req2 is obtained.

[0129] After user A completes identity authentication, the CA server packages user B's identity registration request message ms1 and dynamic key into ms5 = (ms1||Dynamic Key1), packages ms5 into a block, and records it in the ledger of the consortium blockchain, forming a series of connected consortium blockchain blocks. This realizes the on-chaining of user identity information data. The blockchain records user A's identity information and dynamic key. Only after completing a series of identity authentications and generating a dynamic key can the user information be packaged and uploaded to the blockchain.

[0130] At this point, attacker B attempts to mimic the registration process of a legitimate user to attack the configuration process, thus inadvertently revealing their forged identity. The user registration request req1 is packaged with a forged timestamp TimeStamp1 and the public key P of the auditing registration authority RA is used. RA After encryption, the message is sent to the audit and registration authority (RA), which then encrypts it to obtain the user's identity registration request message ms1.

[0131] Because attacker B tampered with the timestamp field in the user registration request, the RA verified that the timestamp (TimeStamp1) was within its validity period. The RA therefore considered the request to have been made within a valid timeframe, thus bypassing the RA's timestamp verification. The RA then verified that attacker B had not registered, meaning the RA generated a public key for attacker B. and private key And perform hash calculation on attacker B's public and private keys to obtain RA uses its private key to digitally sign h1 to obtain Then The public and private keys are packaged together with the timestamp TimeStamp2 and returned to attacker B, allowing attacker B to obtain their own public and private keys.

[0132] The auditing and registration authority (RA) uses its own private key S RA Decrypt the identity registration request message ms1 to obtain the forged identity identifier. The user registration request req1 and the forged timestamp TimeStamp1 are used to access the RA's private key. Perform a hash calculation to obtain the hash value. RA is obtained through private key signing. The RA packages the relevant information into a message ms3 and submits the ms3 to the Certificate Authority (CA). First, the CA checks the received ms3 to confirm that the message's timestamp is valid. Then, the CA obtains the ms3 and performs signature verification to confirm the integrity and authenticity of the user's identity information. The CA then verifies the attacker B's public key. Private key User Identity Authentication Perform a hash calculation to obtain the hash value h4, and determine if h4 and h3 are equal. This indicates... The sender was the Registry Authority (RA), and the message was not tampered with.

[0133] The CA then attempts to authenticate the identity information provided by attacker B. Since the identity verification document provided by attacker B is forged, the CA cannot verify the authenticity of the identity information provided by attacker B. Therefore, the CA cannot effectively authenticate attacker B's identity and will return an authentication failure response to attacker B. Attacker B is identified as an unauthorized attacker, and the current operation is immediately terminated. Furthermore, a digital certificate (Digital Certificate) will not be issued to attacker B, and subsequent on-chain operations will not continue to prevent attacker B from threatening the configuration process; that is, the on-chain process fails.

[0134] (II) Configuring the Operation Chain On-Chain Process

[0135] The key server will use user A's public key. User A's private key Equipment that needs to be configured The configuration operation request req2, the dynamic key Dynamic Key1, and the current timestamp TimeStamp3 are used to perform a hash calculation to obtain a hash value. The key server then uses its own private key S KS Elliptic curve digital signature of h5 is obtained Then Packaged with the current timestamp (TimeStamp3), it is used as a configuration transaction request. Finally, Trans KS Send to the master node.

[0136] This consortium blockchain network consists of seven consensus nodes, with one selected as the master node and the remaining six as slave nodes. The master node receives the configuration transaction request (Trans). KSThen, first verify Trans. KS Is it reliable? Master node pair Perform a hash calculation to obtain the hash value. Verification yields h6 = h5, thus obtaining Trans. KS The sender is a key server, indicating that the transaction request (Trans) is configured. KS If successful, the master node will Trans KS In Once placed in the transaction pool, the master and slave nodes enter the transaction information verification phase.

[0137] The master node obtains from the transaction pool right Perform a hash calculation to obtain the hash value. The master node obtains the user's public key from the transaction pool. Master node use Asymmetric encryption is performed on h7 to obtain The master node then uses the slave node's public key P RN right and Elliptic curve encryption is performed to obtain... ,get The master node will and T TS This transaction information is broadcast to the slave nodes and recorded as a block.

[0138] The slave node receives the block Trans broadcast by the master node. PN Then, the slave node performs a transaction on the Trans process. PN Verification is performed to ensure the authenticity of the configuration transaction information. First, the node uses its private key S... RN In the configuration transaction information Perform elliptic curve decryption to obtain The node uses user A's private key. right Decryption using an asymmetric decryption method proves that this identity registration information was initiated by a legitimate user. (From node pair) Perform a hash calculation to obtain We can obtain h8 = h7, then we can prove... It has not been tampered with.

[0139] After the node passes the timeliness verification, more than [time limit] If the slave nodes reach a consensus on the configuration transaction request initiated by user A, then the configuration operation request initiated by user A is valid, denoted as . That is, after the master node receives consensus from the five slave nodes, the master node uses the public key P configured in the system.CS Transaction configuration request Trans PN Perform elliptic curve cryptography to configure transaction request messages Then it is sent to the configuration system for configuration operations.

[0140] First, configure the system to use the public key P. CS The shared key (SharedKey) is then passed to the master node PN and calculated. PN =S PN ·P CS , recorded as SharedKey PN Subsequently, the master node PN also sends the public key P. PN The shared key (SharedKey) is passed to the configuration system and calculated. CS =S CS ·P PN .

[0141] When the configuration system CS receives the configuration transaction request message Then use your private key S CS After performing the decryption operation and obtaining the timestamp, the configuration system checks if the configuration request message is within the valid time period, thus obtaining the device that needs to be configured. Configure the operation request req2 and the dynamic key, and configure the system CS to request the corresponding device from the master node. The account information is packaged and sent to the master node as a request for device account information.

[0142] The master node receives the request message req CS Then, check the request information req. CS Within the validity period, the device identifier that needs to be configured can be obtained. Device account Device account password Package the above device information into device account information. Then use the shared key in MS6. PN Encryption And send it to the configuration system CS. After receiving the encrypted device account information returned by the target node, the configuration system uses the configuration system's shared key SharedKey. CS Decrypting the encrypted information reveals the device's account information (ms6), which can be obtained by configuring the system CS.

[0143] After obtaining the device's account and password, the configuration system CS logs into the corresponding target device and performs configuration operation requests (req2) on the device. Complete each configuration operation in req2. After completing the configuration, record the current device end status (EndStatus) and disconnect from the device. Log out of the device. The configuration operation request req2, dynamic key 1, device end status, and other data are packaged into a block. A The configuration operation data is recorded in the ledger of the consortium blockchain, thus enabling the configuration operation to be uploaded to the blockchain and forming the configuration operation chain.

[0144] User C is a legitimate user who has passed identity verification. The authentication process for User C and the process of uploading User C's information to the blockchain are the same as the authentication process for User A. The master node receives User C's configuration transaction request (Trans). KS Then, first verify Trans. KS Is it reliable? Master node pair Perform a hash calculation to obtain the hash value. Verification yields h6 = h5, thus obtaining Trans. KS The sender is a key server, indicating that the transaction request (Trans) is configured. KS Passed. The master node will Trans KS In The transaction is placed in the transaction pool, and both the master and slave nodes enter the transaction information verification phase. The slave node verifies the transaction information upon receiving the configuration transaction request (Trans) broadcast by the master node. KS Then, the slave node performs a transaction on the Trans process. KS Verification is performed to ensure the authenticity of the configured transaction information.

[0145] Because user C intentionally initiated an incorrect configuration request, this request did not meet user C's permissions. All six slave nodes reported verification failure to the master node. Therefore, user C's configuration request authentication failed, indicating that the request was illegitimate. In other words, after receiving all the failed verification responses from the slave nodes, the master node will reject user C's configuration request, and the configuration system will not proceed with subsequent configuration actions or package the request for on-chain processing.

[0146] Then, the security administrator uses the user C's identity information recorded on the user information data chain to add user C to the untrusted list and remove user C's operation permissions to prevent user C from launching malicious attacks again and disrupting the configuration operation process.

[0147] User D is a legitimate user who has passed identity verification. The authentication process for User D and the process of uploading User D's information to the blockchain are the same as for User A. Due to a personal error, User D entered an incorrect configuration command or parameter, generating an incorrect configuration operation request req2. The slave node, upon receiving the configuration transaction request Trans broadcast by the master node... KS Then, the slave node performs a transaction on the Trans process. KS During verification, the slave nodes determined that user D's configuration operation request req2 did not meet the operation permissions of the target configuration device. A total of 5 slave nodes reported verification failures to the master node, exceeding the limit. If the slave nodes disagree, user D's configuration operation request (req2 authentication) fails, indicating that user D's configuration operation request is invalid. In other words, the master node receives more than [a certain number of requests]. If the slave node fails to respond, the master node will reject the configuration operation request from user D, and the configuration system will not continue to complete the subsequent configuration actions or package and upload the data to the blockchain.

[0148] If User D's configuration request fails due to their own misoperation, the configuration operation will not be completed normally. If User D subsequently discovers that their configuration request has failed, they can promptly check and correct the error, then resubmit the correct configuration request. If the revised request passes the node consensus, the configuration operation can continue.

[0149] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention and are not intended to limit it. Although the present invention has been described in detail with reference to preferred embodiments, those skilled in the art should understand that modifications or equivalent substitutions can be made to the technical solutions of the present invention without departing from the spirit and scope of the present invention, and all such modifications or substitutions should be covered within the scope of the claims of the present invention.

Claims

1. A method for configuring industrial equipment based on a dual-chain architecture, characterized in that: The method includes the following steps: S1: Initialization Phase: Configure the system to install the consortium blockchain client. The consortium blockchain network selects master and slave nodes according to the consensus algorithm. The master node determines the industrial devices that each system user can access and the operations that can be configured. The system CS records the industrial devices. Initial state before configuration and for all industrial equipment Number them, and they are called equipment. Put the equipment And the initial state is written into the genesis block; S2: User Registration Completion Stage: Users enter their identity information to register, obtain their user identity account, and send the identity registration request message and timestamp to the registration authority (RA); S2 specifically includes: S21: The client sends an identity registration request: When users When identity registration is required, the client will identify the user. , and timestamp Package and generate registration request message and using the public key of the auditing registration authority (RA). After encryption, it is sent to the review and registration authority (RA). S22: Request message from the Registration Authority (RA) to verify the identity of the registration request. ; S23: Verification message After it becomes effective, Get users Then, it checks whether the user's identity information has been registered before. If it has, it stops the registration process; otherwise, it does not. Generate public keys for the user terminal and private key ; After calculating the user's public and private key pair, firstly... , Perform a hash calculation to obtain the hash value. reuse private key right Obtain by signing Then and timestamp Packaged as a message Return to the user; S24: The user receives... First, check if the message is within its validity period. If the message has expired, discard it and resend the registration request; if it is valid, the client then utilizes... public key Regarding the message Perform signature verification and pass the public key. Public, private key Saved by the user; S3: User Authentication Phase: The Registration Authority (RA) reviews the received user registration information. Upon successful review, it submits the information to the Certificate Authority (CA) for authentication. Once authentication is successful, the CA issues a digital signature certificate to the user. The key server generates a dynamic key and packages the user information data onto the blockchain. S3 specifically includes the following steps: S31: Use your own private key Decrypt identity registration request message , ,right Perform a hash calculation to obtain the hash value. ; Using your private key right Perform elliptic curve digital signature to obtain the elliptic curve digital signature. }; Will Elliptic curve digital signatures Packaged as a message ,Will Submit to the certificate authority ; S32: Certification Authority Upon receiving the message Then, verification message To verify the trustworthiness of the information provided by the CA, preventing malicious attackers from impersonating the RA to launch attacks, the CA then verifies the user's identity. If the verification is successful, the user's identity is confirmed; otherwise, the user is considered an unauthorized user, and the process ends immediately. Once the user's identity is verified... Digital certificates containing users' public keys and identity information will be issued. , User public key User identification and timestamp Packaged =( ),Will Perform elliptic curve digital signature to obtain the digital signature. , The issued digital certificate is published to a public certificate store so that other users can obtain and verify it. The validity of the certificate; and the key server stores the user's public and private key pairs so that the public and private key pairs can be recovered if the user loses the certificate; S33: Dynamic key generation stage, which includes the following steps: S331: The user client and the key server establish a TCP connection, i.e., the user client sends a TCP connection request to the key server; the key server responds to the user client's TCP connection request, thus successfully establishing a connection between the key server and the user client; the user client requests the key server's public key, and the key server provides the public key... Send to the client, the client uses the public key Save the private key. The key is stored by the key server; the user also needs to generate a configuration operation request. The user terminal uses its own public key Current timestamp and fixed strings Pack together to form a new string for the user. ), and the new string Through the public key of the key server Encryption with dynamic key , Ensure the information transmission is complete and consistent; then use the dynamic key. Send to the key server; S332: The key server receives the dynamic key. Using private key Perform the decryption operation, and then verify the dynamic key. If the timestamp has not expired, it proves that the dynamic key is valid. If valid, the timestamp is extracted, and the key server uses the user's public key. Current timestamp and fixed strings Pack together to form a new string for the user. ), and the new string Through the public key of the key server Encryption with dynamic key This yields the same dynamic key as the user's. = ; S333: The user terminal generates a dynamic key. Then, through the dynamic key Encryption configuration operation request This generates encrypted configuration operation request information. ), and will Send to the key server; the key server receives the configuration operation request information. Then, firstly, a dynamic key is used. Perform the decryption operation, then verify the message, if the operation request information is configured. If the timestamp has not expired, it indicates that the response was sent to the user's client using a dynamic key generated after successful authentication, and the configuration operation request was obtained. ; S34: After generating the dynamic key User registration request message Packaged with dynamic key as =( ),Will Packaged into blocks The data is recorded in the ledger of the consortium blockchain, forming a series of connected consortium blockchain blocks, realizing the on-chaining of user identity information data, forming a user information data chain, and enabling the auditing and traceability of user identity information; S4: Consensus Phase of Consortium Blockchain Network: The master node receives the configuration transaction request and broadcasts it to the slave nodes; the consensus network performs consensus judgment on the configuration transaction request data, and if a consensus is reached, the transaction request is sent to the configuration system CS; S4 specifically includes the following steps: S41: The key server will transfer the user's public key. User private key Equipment that needs to be configured Configuration operation request Dynamic key and current timestamp Perform hash calculation; obtain hash value The key server then uses its own private key. right Elliptic curve digital signature is obtained { }, then , , 、 { } and current timestamp Packaged and used as a configuration transaction request { } Finally, Send to the master node; S42: The master node receives the configuration transaction request. Afterwards, verification To ensure reliability and prevent malicious attacks using forged dynamic keys; configure transaction requests. After passing, the master node will In Once placed in the transaction pool, the master and slave nodes enter the transaction information verification phase; S43: The master node generates and broadcasts transaction information, which includes the following steps: S431: The master node retrieves the configuration request initiated by the user from the transaction pool ( ),right Perform a hash calculation to obtain the hash value. The master node obtains the user's public key from the transaction pool. The master node uses right Perform asymmetric encryption to obtain The master node then uses the slave node's public key. right( )and Elliptic curve encryption is performed to obtain... ,get The master node will and This transaction information is broadcast to the slave nodes and recorded as a block. ),in Indicates the timestamp of the configuration transaction information in this round; S432: The slave node receives the block broadcast by the master node. Then, the slave node pairs Verification is performed to ensure the authenticity of the configuration transaction information; firstly, the node uses its own private key. In the configuration transaction information Perform elliptic curve decryption to obtain The node uses the user's private key. right Decrypt using an asymmetric decryption method. If decryption is successful, it indicates that this identity registration information was initiated by a legitimate user; from the node pair Perform a hash calculation to obtain ,if = Then prove It has not been tampered with; after the slave node confirms that the sender of the configuration transaction information is the master node and that the configuration transaction information is reliable, the slave node verifies the information in the configuration transaction information. Whether it is within the validity period, record the verification timestamp. The time is Assuming the validity period is long ,like The transaction information is therefore considered to have a time limit. S433: If, after the timeliness verification of the slave node is qualified, there are more than [a certain number of nodes], [the following applies]. If the slave nodes reach a consensus on the configuration transaction information, then the verification of the authenticity of the configuration transaction information is successful. This also indicates that the slave nodes have determined that the user's identity authentication is successful, meaning that the configuration operation request initiated by the user is legitimate. This is denoted as... Conversely, if the terminal device authentication fails, it is recorded as... After successfully verifying the configuration transaction information initiated by the user, the master node uses the public key of the configuration system. Configuration transaction request Perform elliptic curve cryptography to configure transaction request messages ( Then send it to the configuration system for configuration operations; S5: Configuration Operation Completion Phase: The configuration system CS receives the read transaction request data, uses the configuration system CS to issue configuration information, completes the configuration operation for the industrial equipment, and packages the configuration operation information onto the blockchain after the operation; specifically including the following steps: S51: First, configure the system to use the public key. Passed to the master node And calculate the shared key. = , recorded as shared key Subsequently, the master node Similarly, the public key The shared key is passed to the configuration system and calculated. = ; S52: The configuration system CS receives a configuration transaction request message. Then use your private key After performing the decryption operation and obtaining the timestamp, the configuration system checks whether the configuration request message is within the valid time. If it is valid, the device to be configured is obtained. and dynamic key The system CS is configured to request the corresponding device from the master node. The device account information is sent to the master node to request device account information. ),in This is a request for the corresponding device account information. For timestamps, To configure the device's identity, Includes request message content and message digest ; S53: The master node receives the request information. Then, first check the request information. Is it within the validity period? If requesting information Discard if expired. And return an access denied response; if the request information If it has not expired, the device identifier that needs to be configured will be obtained. Device account Device account password And package the above device information into device account information. Using shared keys Encryption The target node sends the encrypted device account information to the configuration system (CS). Upon receiving the encrypted device account information from the target node, the configuration system uses its shared key. Decrypt the encrypted information to obtain the device's account information. That is, to configure the system CS to obtain ; S54: After obtaining the device's account information, the configuration system CS logs into the corresponding target device and follows the instructions received. For industrial equipment Complete each item one by one The configuration operation is performed within the specified timeframe; after completing the configuration operation, the current device termination status is recorded. and disconnect from industrial equipment Log out of the connection; disconnect the device. , Dynamic key The device is in a state of termination. Data is packaged into blocks The configuration operation data is recorded in the ledger of the consortium blockchain, thus enabling the configuration operation to be uploaded to the blockchain and forming the configuration operation chain.

2. The industrial equipment configuration method based on a dual-chain architecture according to claim 1, characterized in that: S1 specifically includes the following steps: S11: First, configure the system CS to randomly select a base domain. , If a number is a prime number greater than 3, it means that there are prime numbers in the base field. Each element; then configure the system in the base domain. satisfy The elliptic curves on this base domain satisfy the elliptic curve... Then configure the system to randomly select an order of 1 on the elliptic curve. The base point ,in For prime numbers to satisfy and will Broadcast throughout the architecture; then configure the system to generate a random number as its private key. And calculate the public key of the configuration system. = , recorded as public key and the public key Public, private key Saved by the configuration system CS; S12: The consortium blockchain network selects master and slave nodes based on a consensus algorithm; the consortium blockchain generates random numbers as the private keys of the master nodes. And calculate the public key of the master node. = , recorded as public key and the public key Public; simultaneously, a public key is generated from the node. and private key , public key In this system, both master and slave nodes publicly disclose their public keys as their identity identifiers, while their private keys are stored separately by the master and slave nodes. All consensus nodes are configured into a blockchain network through a P2P network, and each node obtains its permission list through the IPFS private network. S13: The key server generates its own public key. and private key , public key The private key is publicly available; the private key is stored by a key server. S14: The master node determines the industrial equipment that users can access and the operations they are allowed to perform, formulates access control policies, and manages all industrial equipment. Identification is called device identification. This forms the user permission table; S15: Configuration System CS Recording Industrial Equipment The initial state before configuration, the device and initial state before configuration Pack and write the configuration operation chain into the genesis block.

3. The industrial equipment configuration method based on a dual-chain architecture according to claim 2, characterized in that: In step S21, the user's identity registration request message is obtained after encryption. ; In S22, the auditing and registration body (RA) receives... Post-use Decryption yields the timestamp Then the Registrar of Accounts (RA) checks the timestamp of the user's registration request message. Is it within the validity period? Not valid. It is an auditing and registration agency receive timestamp, express The time of receiving the identity registration request message and The valid time difference between the time the registration request message was generated. If the inequality does not fall within the valid time difference range, then the message... Expired, registration authority Return a rejection message directly; if the inequality is satisfied within the valid time difference range, then the message indicates a rejection. If valid, then the registration authority will review it. Continue checking users Identity identifier Perform the following steps; In S23, In S24, the hash value ,if Then verify , The sender is To prevent counterfeiting Malicious nodes.

4. The industrial equipment configuration method based on a dual-chain architecture according to claim 3, characterized in that: In S31, In S32, firstly For received Check if the timestamp of the message is within the validity period. If the timestamp has expired, discard the message and resend the registration request. If the timestamp is valid, then Get Message Signature verification is performed to verify the completeness and authenticity of the user's identity information. User public key , Perform a hash calculation to obtain the hash value. and determine and If they are equal, the verification passes. , The sender is The message was not tampered with.

5. The industrial equipment configuration method based on a dual-chain architecture according to claim 4, characterized in that: In S42, the master node pair Perform a hash calculation to obtain the hash value. ;like = If the verification passes, then the verification is successful. The sender is the key server, preventing malicious attackers from impersonating the key server.

Citation Information

Patent Citations

  • Device networking authentication method based on blockchain

    CN108833081A

  • industrial Internet of Things equipment identity authentication and security interaction method based on a block chain

    CN109918878A