Cross-domain authentication method based on blockchain and certificateless signature

Through blockchain and certificateless signature technology, combined with smart contracts and KGC methods to generate private keys, the problem of high certificate management costs and high computational overhead in cross-domain authentication of industrial IoT devices is solved, achieving security, privacy protection and efficiency. cross-domain authentication.

CN117424708BActive Publication Date: 2024-10-11YUNNAN UNIV
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202311582293.4
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2023-11-24
Publication Date
2024-10-11
Estimated Expiration
2043-11-24

AI Technical Summary

Technical Problem

Existing cross-domain authentication methods for industrial IoT devices rely on trusted third-party certificate management, which results in high certificate management costs, high computational overhead, and vulnerability to attacks. It is also difficult to achieve the security and privacy protection of certificate-less cross-domain authentication.

Method used

Using a cross-domain authentication method based on blockchain and certificate-less signatures, the signature is verified through smart contracts to reduce device computing overhead, and the device private key is jointly generated through KGC. The device negotiates the session key during the authentication process, reducing the need for trusted third parties. dependence on three parties.

Benefits of technology

It achieves the security and privacy protection of certificate-less cross-domain authentication, reduces device computing overhead, improves the feasibility and security of the authentication method, and avoids the cost of certificate management and the risk of single point failure.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN117424708B_ABST
    Figure CN117424708B_ABST
Patent Text Reader

Abstract

The present invention discloses a cross-domain authentication method based on blockchain and certificateless signature, which belongs to the technical field of industrial Internet of Things. Through a cross-domain authentication framework, mutual authentication of the identities of industrial Internet of Things devices is performed before cross-domain data sharing collaboration in different management domains, and session keys are generated through negotiation; the cross-domain authentication method includes an identity registration stage and a cross-domain authentication stage; the present invention combines blockchain and certificateless signature to complete cross-domain identity authentication of different management domains, and the authentication process is anonymized. The negotiation of session keys is also completed in the authentication process. Cross-domain authentication uses smart contracts for verification, which is more friendly to the computing performance requirements of Internet of Things devices.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention belongs to the technical field of industrial Internet of Things, and in particular relates to a cross-domain authentication method based on blockchain and certificateless signature. Background Art

[0002] With the rapid development of information technology and the continuous maturity of technologies such as the Internet of Things, intelligent manufacturing will play a vital role in the innovation and development of the global manufacturing industry. In the traditional industrial production process, the production of a complete product mainly relies on the independent production of each factory, but with the complexity of the industrial production process, the production of products may now require the collaboration of multiple manufacturers in related fields to complete. Therefore, in this context, it becomes necessary for IoT devices in different management domains (factories) to circulate and interact with data in the production process of products.

[0003] However, cross-domain collaboration of industrial IoT devices often faces many problems. All devices in a management domain are operated and coordinated by the same organization. These devices have a strong trust relationship and can establish communication more quickly and conveniently during collaborative computing. However, when devices in different management domains collaborate, they cannot perform data transmission and collaborative computing because their identities have not been verified. At present, the research methods for cross-domain collaborative authentication between different devices mainly focus on using cryptographic technologies such as public key infrastructure (PKI) and identity-based cryptography (IBC) to solve the identity authentication problem of devices between different management domains. However, these technologies rely on a trusted third party for maintenance, which requires extremely high security and reliability. As the number of devices increases, the cost of certificate maintenance will become extremely expensive.

[0004] Chinese patent CN113672942A discloses a blockchain-based PKI certificate cross-domain authentication method, which has the following disadvantages: 1. With the increasing number of users, the management of certificates becomes extremely inconvenient; 2. The verifier's detection of the digital certificate corresponding to the public key will also bring additional computing and operational overhead; 3. The authentication server in the PKI-based method is vulnerable to potential attacks, resulting in a single point of failure.

[0005] Chinese patent CN113132097A discloses a lightweight certificateless cross-domain authentication method, system and application suitable for the Internet of Things. In the identity-based encryption part, the public and private keys of the device are generated by an authorized agency, which is easy to cause key leakage, and the computing overhead of the device during the cross-domain authentication process is large. Summary of the invention

[0006] In view of this, the purpose of the present invention is to provide a cross-domain authentication method based on blockchain and certificateless signature, to solve the cross-domain authentication problem between different management domains, to use certificateless signature technology, and to eliminate the certificate maintenance problem; to use smart contract technology to verify the signature, and to reduce the computing overhead of the device; blockchain nodes are distributed in various domains, reducing the dependence of authentication services on trusted third parties; the device private key is jointly generated by the device and KGC, and KGC cannot know the complete private key of the device; the device also completes the negotiation of the session key during the authentication process, to ensure the security of subsequent communications.

[0007] In order to achieve the above object, the present invention provides the following technical solutions:

[0008] A cross-domain authentication method based on blockchain and certificateless signature, through a cross-domain authentication framework, mutual authentication of industrial Internet of Things device identities is performed before cross-domain data sharing collaboration in different management domains, and session keys are generated through negotiation; the cross-domain authentication method includes an identity registration stage and a cross-domain authentication stage;

[0009] In the identity registration phase, when a new device in the workshop needs to register its identity, the device first sends a registration request to the KGC in the domain, and the KGC generates an ID and a partial private key for the device; after receiving the partial private key, the device generates a complete public key and private key, and sends the ID information and public key to the edge gateway; the edge gateway packages the device information into an identity credential and hands it over to the blockchain node for on-chain storage;

[0010] In the cross-domain authentication phase, when the management domain Domain A Industrial IoT Devices in Dev i Want to communicate with another domain B Devices in Dev j When establishing communication and obtaining its production data, first pass through the management domain Domain A Edge Gateway A Domain B Edge Gateway B Initiate a project with Dev i Signed request message. B Get EGateway stored on the blockchain A The identity certificate is used to verify the signature in the request message through the smart contract. If it passes, EGateway B Device Dev j Send verification result; device Dev j After receiving the verification result, a partial session key is generated and sent to the server through EGateway AInitiate a request message to establish communication, EGateway A Send the partial session key to the device Dev i ,Device i and Devices j The same final session key is calculated by partial session keys, and the final device Dev i and Devices j Complete cross-domain identity authentication.

[0011] Furthermore, the cross-domain authentication framework consists of a physical layer, an authentication layer, and a network layer. The physical layer includes production equipment in each factory in the industrial IoT environment; the authentication layer includes a KGC host responsible for generating partial keys for each IoT device; the network layer includes an edge gateway responsible for forwarding internal IoT device authentication requests, a consortium chain node responsible for maintaining blockchain consensus and data on-chain, and a smart contract responsible for verifying signatures and data interactions; specifically, it includes the following components:

[0012] Industrial IoT devices: refers to workshop manufacturing equipment that directly participates in cross-domain communication under a certain management domain, has sensors that can collect production data, and interacts with edge gateways through network sensors; after generating complete public and private keys, the device sends the public key and identity information to the edge gateway, so that the edge gateway can generate temporary identity credentials for the IoT device in the next step;

[0013] Edge Gateway: There is an independent edge gateway in each management domain, which has certain computing power and can store IIoT device information. The edge gateway is responsible for managing all authentication requests in and out of the management domain, and generates temporary identity credentials for IIoT devices in the workshop based on device information. When receiving authentication requests from other management domains, the edge gateway will query the identity information on the chain and call the smart contract to verify its legitimacy and authenticity.

[0014] Blockchain: maintained by blockchain service nodes distributed in various management domains. When receiving device identity information data sent by the edge gateway, the blockchain node stores this data on the chain;

[0015] KGC: Responsible for generating the public parameters required for various certificateless public keys, generating partial private keys for different devices based on device information, and then returning partial private keys to industrial IoT devices through secure communication channels.

[0016] Furthermore, before the device starts to register, KGC generates a series of public parameters and broadcasts them to all IIoT devices in the workshop; KGC selects a prime number q with a length of λ-bit, λ is a security parameter; G is a q-order elliptic additive group over a finite field Fq, P∈G is a generator, and KGC randomly selects And calculate P pub =sP, where the system master key msk=s is kept secret; select three different secure hash functions KGC publishes system public parameters P pub = {q, G, P, P pub , H1, H2, H3}.

[0017] Furthermore, during the initialization phase of the system, the manager of each factory first generates an identity certificate for the edge gateway and uploads it to the blockchain. The identity certificate includes: the factory ID fac i , the workshop number inside the factory i , the device number of the edge gateway i , the globally unique identity of the edge gateway IM i , through IM A =hash(fac A ||workshop A ||equ A ||P A ) is generated, where P A is the public key S of the edge gateway A , generated by running the RSA algorithm; first calculate n = p * q, Then select an integer e that is less than u and satisfies gcd(φ(n), e) = 1, and finally generate a public-private key pair {P A {e, n}, S A {d, n}}, where d satisfies d = e-1(modφ(n));

[0018] When a new device in the workshop needs to register its identity, the device first sends a registration request to the KGC in the domain, and the KGC generates an ID and a partial private key for the device. After receiving the partial private key, the device generates a complete public key and private key, and sends the ID information and public key to the edge gateway. The edge gateway packages the device information into an identity credential and hands it over to the blockchain node for on-chain storage.

[0019] Furthermore, the specific process of the identity registration stage is as follows:

[0020] 1)Dev i →KGC A :m1=(Register, TS1, workshop A ,equ A )

[0021] DeviceDev i Generate a request message and send the device number to KGC A , request KGC AGenerate a partial private key for the device; Dev i Generate timestamp TS1, workshop A For Dev i The workshop number, equ A For Dev i The device number; the last Dev i Will generate message m1 = (Register, TS1, workshop A ,equ A ) and sends it to the factory's KGC server;

[0022] 2) KGC A -→Dev i :m2=(TS2,ID i , Q i , d i )

[0023] KGC A After receiving the authentication message, first check |T now -TS1|<ΔT is true, if true, a unique identity ID is generated i and Dev i Finally, the message m2 = (TS2, ID i , Q i ,d i ) is sent to Dev via a secure channel i ;

[0024] 3)

[0025] Dev i After receiving message m2, first check |T now -TS2|<ΔT is true, if true, save ID i As its own unique identity;

[0026] Dev i exist Randomly select x from i , and SK i =(d i , x i ) is set as its private key, and then P is calculated i =x i P, its own public key is set to PK i =(Q i , P i ), and finally, Dev i Generate timestamp TS3, random number N2, calculate V1 = Hash (PK i||TS3||ID i ) Generate message m3 = (upload, ID i , PK i , TS3, V1), using EGateway A Public Key P A Encrypted and sent to EGateway A ;

[0027] 4)EGateway A Decrypt the message using the public key and check |T now -TS3|<ΔT is true, if it meets the requirements, then calculate V′1=hash(PK i ||TS3||ID i ), if V1=V′1, then Dev i The public key is set to PK i =(Q i ,P i ), set the device Dev i The information is packaged into identity credentials The certificate contains the factory number fac A , the workshop number inside the factory A , device type Mtype, device unique identity ID i , device public key PK i ;

[0028] 5)EGateway A Dev i Identity credentials It is sent to the blockchain node, which executes the smart contract and stores the public key identity certificate of the device on the chain.

[0029] 6)EGateway A →Dev i :m4=(success)

[0030] After the blockchain node successfully executes the smart contract, the data is persisted and is considered as the device Dev i Registration is successful, and the registration result is notified to Dev i ;

[0031] Furthermore, the specific steps of the cross-domain authentication stage are as follows:

[0032] 1)

[0033] Dev i First get the current timestamp TS4 and generate the message Req i =facA ||workshop A ||TS4||ID i , then Dev i exist Randomly select t and calculate T i =tP, calculate calculate Then Dev i The identity authentication request Req i , timestamp TS4, signature σ i =(T i , τ i ) is encrypted using the edge gateway public key and sent to EGateway A ;

[0034] 2)EGateway A →EGateway B :m6=(IM A , Req i , σ i , TS5, V2, N3)

[0035] When EGateway A Received from Dev i After the authentication request is made, the private key is first used to decrypt the message, and then the |T now -TS4|<ΔT is true, if true, then generate timestamp TS5 and random number N3, calculate V2=(IM A ||Req i ||σ i ||N3||TS5), generates message m6=(IM A , Req i , σ i , TS5, V2, N3) to another management domain Domain B Gateway B ;

[0036] 3)EGateway B →SC-Verify: m7 = (Req i ,σ i )

[0037] When EGateway B Received from EGateway A After the authentication request is made, first check |T now -TS5|<ΔT is true, if it meets the requirements, calculate V′2=hash(IM A ||Reqi ||σ i ||N3||TS5), if V2=V′2 then EGateway B Check the blockchain to see if the device number IM exists A The corresponding certificate If the search is successful, the message is proven to be credible and a σ is sent to the SC-Verify contract address. i =(T i , τ i ) and Req i ;

[0038] 4)SC-Verify→EGateway B :m8=(success,PK i )

[0039] The SC-Verify contract verifies whether the certificateless signature is correct. If the verification is successful, it reports to EGateway B Send authentication results;

[0040] 5)

[0041] EGateway B Generate a random number N4 and timestamp TS6, and set ID i and PK i Packed into message m9 = (TS6, PK i , ID i , N4), encrypted with the private key and sent to Dev j ;

[0042] 6)

[0043] Dev j After receiving the message, use the public key to decrypt and obtain TS6, PK i , ID i ,N4,Dev j Check the freshness of timestamp TS5, if it matches, keep PK i , and calculate the session key Key = x j P i =x j x i P;

[0044] Then Dev j exist Randomly select l and calculate T j =lP;Dev j calculate calculate Dev j Get the current timestamp TS7 and generate the message Req j =fac B ||workshop B ||TS7||ID j ,V3=hash(Req j ||TS7||σ j ||N4), Dev j The authentication request req j , timestamp TS7, signature σ j =(T j , τ j ) and V3 sent to EGateway B ;

[0045] 7)

[0046] When EGateway A Received from Dev j After receiving the message, use the private key to decrypt the message and get Req j ,TS7,σ j ,V3, then check |T now -TS7|<ΔT is true, if it meets the requirements, get the current timestamp TS8, calculate V4=hash(IM B ||Req j ||TS8||σ j ||N3), the request message m 11 =(Req j , IM B ,TS8,σ j , V4) is encrypted using the public key and sent to EGateway A ;

[0047] 8)EGateway A →SC-Verify:m 12 =(σ j , Req j )

[0048] When EGateway A Received from Dev j After the identity authentication request is made, the freshness of the timestamp TS8 is checked. If it meets the requirements, the blockchain is queried for the Dev j Identity certificate If it exists, send σ to the SC-Verify contract address j =(T j , τ j ) and Reqj ;

[0049] 9)SC-Verify→EGateway A :m 13 =(success, PK j )

[0050] SC-Verify verifies whether the signature without a certificate is correct. If the verification is successful, it reports to EGateway A Send authentication result and PK j ;

[0051] 10)

[0052] EGateway A Generate timestamp TS9, calculate V5 = hash (ID j ||TS8||PK j ||N2), and m 14 =(ID j , V5, TS8, PK j )Send to Dev i After receiving the message, Dev i Check the freshness of timestamp TS8. If it matches, calculate V′5=hash(ID j ||TS8||PK j ||N2), if V5=V′5, keep PK j , Computing and Dev j The session key Key = x i P j =x i x j P;

[0053] After the above steps, Dev i and Dev j The authentication of the other party's identity and the negotiation of the session key are completed.

[0054] The beneficial effects of the present invention are:

[0055] 1. A cross-domain authentication scheme based on blockchain and certificateless signature is proposed, and a certificateless signature algorithm is used for cross-domain two-way authentication, realizing heterogeneous domain authentication in the industrial Internet environment;

[0056] 2. To address the issue of device privacy exposure during cross-domain authentication, use identity ID i The on-chain identity credentials provide anonymous authentication for the device, ensuring that the device's authentication records will not be maliciously collected and analyzed, and strengthening the privacy protection of cross-domain authentication;

[0057] 3. The device completes the negotiation of session keys during the authentication process, ensuring the security of subsequent communications;

[0058] 4. In the process of cross-domain authentication, the authentication signature and other information are stored on the blockchain, and the decentralization and non-tamperability of the blockchain are used to improve the security of cross-domain authentication;

[0059] 5. The most critical verification step of cross-domain authentication is completed by using smart contracts, which reduces the computing overhead of the authentication device and improves the feasibility of the authentication method.

[0060] Other advantages, objectives and features of the present invention will be described in the following description and will be apparent to those skilled in the art to some extent, or those skilled in the art may be taught from the practice of the present invention. The objectives and other advantages of the present invention may be realized and obtained through the following description. BRIEF DESCRIPTION OF THE DRAWINGS

[0061] In order to make the purpose, technical solution and beneficial effects of the present invention clearer, the present invention provides the following drawings for illustration:

[0062] Figure 1 Architecture diagram for cross-domain authentication method

[0063] Figure 2 This is the format diagram of the Gateway identity credential;

[0064] Figure 3 For Dev i Format diagram of identity certificate;

[0065] Figure 4 Register a sequence diagram for the identity;

[0066] Figure 5 This is a cross-domain authentication sequence diagram. DETAILED DESCRIPTION

[0067] The proposed cross-domain identity authentication method aims to mutually authenticate the identities of industrial IoT devices and negotiate the generation of session keys before different management domains collaborate on cross-domain data sharing. Specifically, each management domain is an independent factory in the same industrial supply chain. IoT devices in a factory cannot directly interact with IoT devices in other factories. The proposed framework is as follows: Figure 1 shown.

[0068] The framework is mainly composed of the physical layer, authentication layer and network layer from bottom to top. The physical layer mainly includes the production equipment of each factory in the industrial Internet of Things environment, the authentication layer mainly includes the KGC host responsible for generating partial keys for each IoT device, and the network layer mainly includes the edge gateway responsible for forwarding internal IoT device authentication requests, the alliance chain node responsible for maintaining blockchain consensus and data on-chain, and the smart contract responsible for verifying signatures and data interactions. The detailed functions of each component are as follows:

[0069] 1) Industrial IoT devices: Industrial IoT devices refer to workshop manufacturing equipment that directly participates in cross-domain communication under a certain management domain. These industrial IoT devices usually have sensors that can collect production data and can interact with edge gateways through network sensors. After generating complete public and private keys, the device needs to send the public key and identity information to the edge gateway so that the edge gateway can generate temporary identity credentials for the IoT device in the next step.

[0070] 2) Edge Gateway: There is an independent edge gateway in each management domain. It is generally believed that the edge gateway has certain computing power and can store a large amount of industrial IoT device information. The edge gateway is mainly responsible for managing all authentication requests in and out of the management domain, and generating temporary identity credentials for industrial IoT devices in the workshop based on device information. When receiving authentication requests from other management domains, the edge gateway will query the identity information on the chain and call the smart contract to verify its legitimacy and authenticity.

[0071] 3) Blockchain: The blockchain is maintained by blockchain service nodes distributed in various management domains to ensure the normal progress of blockchain consensus. When receiving data such as device identity information sent by the edge gateway, the blockchain node saves this data on the chain.

[0072] 4) KGC: KGC is responsible for generating the public parameters required for various certificateless public keys, generating partial private keys for different devices based on device information, and then returning the partial private keys to the industrial IoT devices through a secure communication channel.

[0073] In the entire IoT device cross-domain authentication scheme, it is divided into the identity registration phase and the cross-domain authentication phase. Before the device starts to register, KGC generates a series of public parameters and broadcasts them to all industrial IoT devices in the workshop. KGC selects a prime number q with a length of λ-bit, where λ is a security parameter. G is a q-order elliptic additive group over a finite field Fq, P∈G is a generator, and KGC randomly selects And calculate P pub =sP, where the system master key msk=s is kept secret. Select three different secure hash functions KGC publishes system public parameters P pub= {q, G, P, P pub , H1, H2, H3}.

[0074] The main symbols and their meanings in this embodiment are shown in Table 1.

[0075] Table 1

[0076]

[0077] Identity authentication stage:

[0078] During the initialization phase of the system, the manager of each factory first generates an identity certificate for the edge gateway and uploads it to the blockchain. The certificate format is as follows: Figure 2 As shown. i Represents the number of different factories, workshop i Represents different workshop numbers within the factory, equ i Represents the device number of the edge gateway, IM i It is the globally unique identifier of the edge gateway. A =hash(fac A ||workshop A ||equ A ||P A ) is generated, where P A is the public key S of the edge gateway A , generated by running the RSA algorithm. First, calculate n = p * q, Then select an integer e that is less than u and satisfies gcd(φ(n), e) = 1, and finally generate a public-private key pair {P A {e, n}, S A {d, n}}, where d satisfies d=e-1(modφ(n)).

[0079] When a new device in the workshop needs to register its identity, the device first sends a registration request to the KGC in the domain, and then the KGC generates an ID and a partial private key for the device. After receiving the partial private key, the device generates a complete public key and private key, and sends the ID information and public key to the edge gateway. The edge gateway packages the device information into an identity credential and gives it to the blockchain node for on-chain storage. Figure 4 As shown, the specific process is as follows:

[0080] 1)Dev i →KGC A :m1=(Register,TS1,workshopA,equ A )

[0081] DeviceDev iGenerate a request message and send the device number to KGC A , request KGC A Generate a partial private key for the device. i Generate timestamp TS1, workshop A For Dev i The workshop number, equ A For Dev i Finally, Dev i Will generate message m1 = (Register, TS1, workshop A ,equ A ) and sends it to the factory's KGC server.

[0082] 2) KGC A →Dev i :m2=(TS2,ID i ,Q i , d i )

[0083] KGC A After receiving the authentication message, first check |T now -TS1|<ΔT is true, if true, run Algorithm 1 to generate a unique identity ID i and Dev i Finally, the message m2 = (TS2, ID i ,Q i , d i ) is sent to Dev via a secure channel i .

[0084] Algorithm 1

[0085]

[0086] 3)

[0087] Dev i After receiving message m2, first check |T now -TS2|<ΔT is true, if true, save ID i As its unique identity.

[0088] Dev i exist Randomly select x from i , and SK i =(d i ,x i ) is set as its private key, and then P is calculated i =x iP, its own public key is set to PK i =(Q i , P i ), and finally, Dev i Generate timestamp TS3, random number N2, calculate V1 = Hash (PK i ||TS3||ID i ) Generate message m3 = (upload, ID i , PK i , TS3, V1), using EGatewayA public key P A Encrypted and sent to EGatewayA.

[0089] 4)EGateway A Decrypt the message using the public key and check |T now -TS3|<ΔT is true, if it meets the requirements, then calculate V′1=hash(PK i ||TS3||ID i ), if V1=V′1, then Dev i The public key is set to PK i =(Q i , P i ), set the device Dev i The information is packaged into identity credentials The voucher contains information such as Figure 3 As shown, fac A Represents the number of different factories, workshop A Represents different workshop numbers within the factory, Mtype represents the type of equipment, ID i PK is the unique identifier of the device. i The device public key.

[0090] 5)EGateway A Dev i Identity credentials It is sent to the blockchain node, which executes the smart contract and stores the device’s public key and other identity credentials on the chain.

[0091] 6)EGateway A →Dev i :m4=(success)

[0092] After the blockchain node successfully executes the smart contract, the data is persisted and is considered as the device Dev i Registration is successful, and the registration result is notified to Dev i .

[0093] Cross-domain authentication stage:

[0094] When Domain A Industrial IoT Devices in Dev i Want to communicate with another domain B Devices in Dev j To establish communication and obtain production data, you must first go through EGateway A Contact EGateway B Initiate a project with Dev i Signed request message. B Get EGateway stored on the blockchain A The identity certificate is used to verify the signature in the request message through the smart contract. If it passes, EGateway B Device Dev j Send verification result. Device Dev j After receiving the verification result, a partial session key is generated and sent to the server through EGateway A Initiate a request message to establish communication, EGateway A Send the partial session key to the device Dev i ,Device i and Devices j The same final session key is calculated by partial session keys, and the final device Dev i and Devices j Complete cross-domain identity authentication. Figure 5 As shown, the specific steps are as follows:

[0095] 1)

[0096] Dev i First get the current timestamp TS4 and generate the message Req i =fac A ||workshop A ||TS4||ID i , then Dev i exist Randomly select t and calculate T i =tP, calculate calculate Then Dev i The identity authentication request Req i , timestamp TS4, signature σ i =(T i , τ i ) is encrypted using the edge gateway public key and sent to EGatewayA.

[0097] 2)EGateway A →EGateway B :m6=(IM A , Req i , σ i , TS5, V2, N3)

[0098] When EGateway A Received from Dev i After the authentication request is made, the private key is first used to decrypt the message, and then the |T now -TS4|<ΔT is true, if true, then generate timestamp TS5 and random number N3, calculate V2=(IM A ||Req i ||σ i ||N3||TS5), generates message m6=(IM A , Req i , σ i , TS5, V2, N3) to another management domain Domain B Gateway B .

[0099] 3)EGateway B →SC-Verify: m7 = (Req i , σ i )

[0100] When EGateway B Received from EGateway A After the authentication request is made, first check |T now -TS5|<ΔT is true, if it meets the requirements, calculate V′2=hash(IM A ||Req i ||σ i ||N3||TS5), if V2=V′2 then EGateway B Check the blockchain to see if the device number IM exists A The corresponding certificate If the search is successful, the message is proven to be credible and a σ is sent to the SC-Verify contract address. i =(T i ,τ i ) and Req i .

[0101] 4)SC-Verify→EGateway B :m8=(success,PK i )

[0102] The SC-Verify contract runs Algorithm 2 to verify whether the certificateless signature is correct. If the verification is successful, it will report to EGateway B Send authentication result.

[0103] Algorithm 2

[0104]

[0105] 5)

[0106] EGateway B Generate a random number N4 and timestamp TS6, and set ID i and PK i Packed into message m9 = (TS6, PK i ,ID i , N4), encrypted with the private key and sent to Dev j .

[0107] 6)

[0108] Dev j After receiving the message, use the public key to decrypt and obtain TS6, PK i ,ID i , N4. Dev j Check the freshness of timestamp TS5, if it matches, keep PK i , and calculate the session key Key = x j P i =x j x i P.

[0109] Then Dev j exist Randomly select l and calculate T j =lP. Dev j calculate calculate Dev j Get the current timestamp TS7 and generate the message Req j =fac B ||workshop B ||TS7||ID j ,V3=hash(Req j ||TS7||σ j ||N4), Dev j The authentication request req j , timestamp TS7, signature σ j =(T j , τ j) and V3 sent to EGateway B .

[0110] 7)

[0111] When EGateway A Received from Dev j After receiving the message, use the private key to decrypt the message and get Req j ,TS7,σ j , V3, then check |T now -TS7|<ΔT is true, if it meets the requirements, get the current timestamp TS8, calculate V4=hash(IM B ||Req j ||TS8||σ j ||N3), the request message m 11 =(Req j , IM B ,TS8,σ j , V4) is encrypted using the public key and sent to EGateway A .

[0112] 8)EGateway A →SC-Verify:m 12 =(σ j , Req j )

[0113] When EGateway A Received from Dev j After the identity authentication request is made, the freshness of the timestamp TS8 is checked. If it meets the requirements, the blockchain is queried for the Dev j Identity certificate If it exists, send σ to the SC-Verify contract address j =(T j , τ j ) and Req j .

[0114] 9)SC-Verify→EGateway A :m 13 =(success, PK j )

[0115] SC-Verify runs the verification algorithm 2 inside the contract to verify whether the certificateless signature is correct. If the verification is successful, it sends the authentication result and PK to EGatewayA. j .

[0116] 10)

[0117] EGateway A Generate timestamp TS9, calculate V5 = hash (ID j ||TS8||PK j ||N2), and m 14 =(ID j , V5, TS8, PK j )Send to Dev i After receiving the message, Dev i Check the freshness of timestamp TS8. If it matches, calculate V′5=hash(ID j ||TS8||PK j ||N2), if V5=V′5, keep PK j , Computing and Dev j The session key Key = x i P j =x i x j P.

[0118] After the above steps, Dev i and Dev j The authentication of the other party's identity and the negotiation of the session key are completed.

[0119] Finally, it should be noted that the above preferred embodiments are only used to illustrate the technical solutions of the present invention rather than to limit it. Although the present invention has been described in detail through the above preferred embodiments, those skilled in the art should understand that various changes can be made in form and details without departing from the scope defined by the claims of the present invention.

Claims

1. A cross-domain authentication method based on blockchain and certificateless signature, characterized in that: Through the cross-domain authentication framework, mutual authentication of industrial Internet of Things device identities is performed before cross-domain data sharing collaboration in different management domains, and session keys are generated through negotiation; the cross-domain authentication framework consists of a physical layer, an authentication layer, and a network layer; the cross-domain authentication method includes an identity registration stage and a cross-domain authentication stage; In the identity registration phase, when a new IIoT device in the workshop needs to register its identity, the IIoT device first sends a registration request to the KGC in the domain, and the KGC generates an ID and a partial private key for the IIoT device; After receiving the partial private key, the IIoT device generates a complete public key and private key, and sends the ID information and public key to the edge gateway; the edge gateway packages the IIoT device information into an identity credential and hands it over to the blockchain node for on-chain storage; In the cross-domain authentication phase, when the management domain Domain A Industrial IoT Devices in Dev i Want to communicate with another domain B Industrial IoT Devices in Dev j When establishing communication and obtaining its production data, first pass through the management domain Domain A Edge Gateway A Domain B Edge Gateway B Initiate a project with Dev i Signed request message;EGateway B Get EGateway stored on the blockchain A The identity certificate is used to verify the signature in the request message through the smart contract. If it passes, EGateway B To Industrial IoT Device Dev j Send verification results; Industrial IoT device Dev j After receiving the verification result, a partial session key is generated and sent to the server through EGateway A Initiate a request message to establish communication, EGateway A Send partial session key to IIoT device Dev i , Industrial IoT Device Dev i and Industrial IoT Device Dev j The same final session key is calculated by partial session keys, and the final industrial IoT device Dev i and Industrial IoT Device Dev j Complete cross-domain identity authentication; The specific process of the identity registration stage is as follows: 1)Dev i →KGC A :m1=(Register,TS1,workshop A ,equ A ) Industrial IoT Device Dev i Generate a registration request message to request KGC A Generate partial private keys for industrial IoT devices; Dev i Generate timestamp TS1, workshop A For Dev i The workshop number, equ A For Dev i The device number; the last Dev i Generate a registration request message m1 = (Register, TS1, workshop A ,equ A ) and sends it to the factory's KGC server KGC A ; <h2 style=";text-align:left;direction:ltr">2) KGC<h2 style=";text-align:left;direction:ltr"> A <h2 style=";text-align:left;direction:ltr"> →Dev<h2 style=";text-align:left;direction:ltr"> i <h2 style=";text-align:left;direction:ltr"> :m2=(TS2,ID<h2 style=";text-align:left;direction:ltr"> i <h2 style=";text-align:left;direction:ltr"> ,Q<h2 style=";text-align:left;direction:ltr"> i <h2 style=";text-align:left;direction:ltr"> ,d<h2 style=";text-align:left;direction:ltr"> i <h2 style=";text-align:left;direction:ltr"> ) KGC A After receiving the registration request message, first check |T now -TS1|<ΔT is true, if true, a unique identity ID is generated i and Dev i Finally, the message m2 = (TS2, ID i ,Q i ,d i ) is sent to Dev via a secure channel i ; 3) Dev i After receiving message m2, first check |T now -TS2|<ΔT is true, if true, save ID i As its own unique identity; Dev i exist Randomly select x from i , and SK i =(d i ,x i ) is set as its private key, and then P is calculated i =x i P, set its own public key to PK i =(Q i ,P i ), and finally, Dev i Generate timestamp TS3, random number N2, calculate V1 = Hash (PK i ||TS3||ID i ) generates message m3 = (upload, ID i ,PK i ,TS3,V1), using EGateway A Public Key P A Encrypted and sent to EGateway A ; 4)EGateway A Decrypt message m3 using the public key and check |T now -TS3|<ΔT is true, if it meets the requirements, then calculate V′1=hash(PK i ||TS3||ID i ), if V1=V′1, then Dev i The public key is set to PK i =(Q i ,P i ), the industrial IoT device Dev i The information is packaged into identity credentials The document contains the factory number faC A , the workshop number inside the factory A , the type of industrial IoT device Mtype, the unique device ID i , device public key PK i ; 5)EGateway A Dev i Identity credentials Send it to the blockchain node, which executes the smart contract and stores the public key identity certificate of the industrial IoT device on the chain; 6)EGateway A →Dev i :m4=(success) After the blockchain node successfully executes the smart contract, the data is persisted and is considered as an industrial IoT device Dev i Registration is successful, and the registration result is notified to Dev i .

2. According to claim 1, the cross-domain authentication method based on blockchain and certificateless signature is characterized in that: The physical layer includes the IIoT devices of each factory in the IIoT environment; the authentication layer includes the KGC server responsible for generating partial keys for each IIoT device; the network layer includes the edge gateway responsible for forwarding internal IIoT device authentication requests, the alliance chain node responsible for maintaining blockchain consensus and data on-chain, and the smart contract responsible for verifying signatures and data interactions; The industrial Internet of Things device refers to workshop manufacturing equipment that directly participates in cross-domain communication under a certain management domain, has sensors that can collect production data, and interacts with the edge gateway through network sensors; after generating complete public and private keys, the industrial Internet of Things device sends the public key and identity information to the edge gateway, so that the edge gateway can generate temporary identity credentials for the industrial Internet of Things device in the next step; The edge gateway: There is an independent edge gateway in each management domain, which has certain computing capabilities and can store industrial Internet of Things device information; The edge gateway is responsible for managing all authentication requests in and out of the management domain, and generates temporary identity credentials for the industrial IoT devices in the workshop based on the industrial IoT device information. When receiving authentication requests from other management domains, the edge gateway will query the identity information on the chain and call the smart contract to verify its legitimacy and authenticity; The blockchain is maintained by blockchain service nodes distributed in various management domains. When receiving device identity information data sent by the edge gateway, the blockchain node stores the data on the chain. The KGC server is responsible for generating the public parameters required for various certificateless public keys, generating partial private keys for different industrial Internet of Things devices according to the industrial Internet of Things device information, and then returning the partial private keys to the industrial Internet of Things devices through a secure communication channel.

3. According to claim 1, the cross-domain authentication method based on blockchain and certificateless signature is characterized in that: Before the IIoT devices start registering, the KGC server generates a series of public parameters and broadcasts them to all IIoT devices in the workshop. The KGC server selects a prime number q with a length of λ-bit, where λ is a security parameter. G is an elliptic additive group of order q over the finite field Fq, P∈G is a generator, and the KGC server randomly selects And calculate Ppu b =sP, where the system master key msk=s is kept secret; select three different secure hash functions KGC server publishes system common parameters params = {q, G, P, P pub , H1, H2, H3}.

4. According to claim 1, the cross-domain authentication method based on blockchain and certificateless signature is characterized in that: During the initialization phase of the system, the manager of each factory first generates an identity certificate for the edge gateway and uploads it to the blockchain. The identity certificate includes: the factory ID fac i , the workshop number inside the factory i , the device number of the edge gateway i , the globally unique identity of the edge gateway IM i , through IM A =hash(fac A ||workshop A ||equ A ||P A ) is generated, where P A is the public key of the edge gateway, generated by running the RSA algorithm; first calculate n = p * q, Then select an integer e that is less than u and satisfies gcd(φ(n), e) = 1, and finally generate a public-private key pair {P A {e, n}, S A {d, n}}, where d satisfies d = e -1 (modφ(n)).