Block chain cross-chain identity authentication method based on certificateless signcryption
Through the certificate-free password algorithm and the decentralized gateway election mechanism, the problems of low decentralization, large resource consumption and poor scalability in blockchain cross-chain identity authentication are solved, and efficient cross-chain identity authentication and transactions are achieved. Ensures decentralization and interoperability of the system.
Patent Information
- Application Number
- CN202410162494.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-02-05
- Publication Date
- 2024-12-20
AI Technical Summary
The existing blockchain cross-chain identity authentication solution has problems such as low decentralization, large resource consumption and poor scalability, especially due to the dependence of centralized certificate systems and complex cryptography algorithms, resulting in inefficiency and limited interoperability. .
Using cross-chain identity authentication method based on certificate-free encryption, the decentralized cross-chain gateway is elected through Liquid democracy voting, and the cross-chain key is generated and verified using discrete logarithmic certificate-free encryption algorithm, which complies with the W3C DID standard to achieve cross-chain Chain identity authentication and transactions.
It improves the degree of decentralization of the blockchain system, reduces resource consumption, improves the efficiency and scalability of cross-chain identity authentication, and enables cross-chain systems to be better interconnected.
Smart Images

Figure CN119172093A_ABST
Abstract
Description
Technical Field
[0001] The present invention belongs to the technical field of blockchain cross-chain identity authentication, and in particular relates to a blockchain cross-chain identity authentication method based on certificateless signature. Background Art
[0003] Since each blockchain uses a different consensus algorithm and underlying architecture, digital identities in each blockchain present different states, and no unified identity identification space and cross-chain mapping relationship has been formed. Due to the different authentication methods for user identities in different blockchains, the level of trust between blockchain users is very low. Therefore, to achieve cross-chain access between blockchains, a strong trust identity authentication system recognized by all blockchains is required.
[0004] Regarding the identity authentication problem of cross-chain access of blockchain, researchers have proposed their solutions. These solutions have some limitations to a greater or lesser extent. Linlin Zhang et al. designed an identity authentication scheme based on an encrypted database, which can achieve cross-chain secure access. However, in order to ensure the security of data, the scheme uses an encrypted database. The centralized facilities introduced for this purpose reduce the degree of decentralization of the proposed scheme. The cross-chain identity authentication scheme proposed by Wang Sasa et al. uses elliptic curve encryption algorithm and zero-knowledge proof protocol, so the system overhead is large and it is not suitable for blockchain systems with limited computing power. At the same time, the digital identity in the scheme does not comply with the W3C standard, which limits the scalability of the system. In the scheme of Wang Shushuang et al., an identity-based encryption system is used when calculating the private key of the user's cross-chain identity. In their scheme, the problem of how the identity-based encryption system can be used for key custody in the blockchain environment is not solved. The cross-chain identity authentication scheme proposed by Chen Wuyang et al. is based on traditional PKI and requires a trusted third-party central agency to distribute keys.
[0005] Through the above analysis, the problems and defects of the prior art are as follows:
[0006] Existing cross-chain identity authentication solutions generally have one or more of the following three problems:
[0007] (1) The cross-chain solution has a low degree of decentralization and loses the decentralized characteristics of blockchain. If the PKI system is introduced into the solution, there will be problems with the storage and legitimacy verification of public key certificates by third-party institutions; if the IBE system is introduced into the solution, there will be key custody issues.
[0008] (2) Cross-chain solutions require a lot of resources for identity authentication. As a distributed ledger technology, the advantage of blockchain lies in its decentralized and trustworthy characteristics. However, the computing power and storage space of nodes in the blockchain system are limited. Some more complex cryptographic algorithms and protocols, such as zero-knowledge proofs and multi-party secure computing, require a lot of computing resources and storage space, so these solutions are less efficient.
[0009] (3) The scalability of cross-chain solutions is poor. The identity identifiers of some existing cross-chain identity authentication solutions do not follow the decentralized identifiers (DID) standard established by the World Wide Web Consortium (W3C). Therefore, there is no unified identity identification space, and there are difficulties in cross-chain mapping, which reduces the scalability of the overall framework of the proposed solution. Summary of the invention
[0010] In view of the problems existing in the prior art, the present invention provides a cross-chain identity authentication method based on certificateless signcryption.
[0011] The present invention is implemented as follows: a blockchain cross-chain identity authentication method based on certificateless signature includes:
[0012] Step 1: System initialization and application chain registration;
[0013] The relay chain first generates the global system initial parameters. The nodes of the independent blockchain run the Liquid democracy voting contract to elect the decentralized cross-chain gateway (DCCG). The DCCG sends a registration request for the application chain to the relay chain, and obtains the cross-chain key generated by the relay chain for it, as well as the DID document generated by the relay chain for the application chain. The relay chain stores the DID document in the IPFS system identity authentication center to complete the registration of the application chain;
[0014] Step 2: Cross-chain users register on the relay chain;
[0015] After the application chain joins the cross-chain system, users on the chain can initiate a registration request to the relay chain. By executing the agreement, the user can obtain the cross-chain key. The relay chain generates a DID document for the user, and then stores the DID document in the IPFS system identity authentication center to complete the registration of the cross-chain user;
[0016] Step 3: Cross-chain identity authentication and transaction;
[0017] Registered cross-chain users initiate cross-chain requests, requesting cross-chain calls to contracts on other application chains; the call request is forwarded by the DCCG of the initiator's chain to the relay chain, and the relay chain queries the DID document of the IPFS system identity authentication center through the initiator's DID for identity authentication. If the authentication is successful, the relay chain forwards the initiator's cross-chain request to the gateway DCCG of the destination chain, and the gateway DCCG of the destination chain verifies the legitimacy of the cross-chain call. If the verification is successful, the cross-chain transaction is executed. In this process, the relay chain does not know the plaintext information of the forwarded content during identity authentication.
[0018] Further, the system initialization and application chain registration method is as follows:
[0019] System initialization and application chain registration include two steps, namely, the relay chain generates system parameters and the application chain is registered in the cross-chain system. The present invention adopts an improved certificateless signcryption scheme based on discrete logarithms, which is more efficient and more suitable for environments with limited computing resources.
[0020] 1) The relay chain generates initialization parameters;
[0021] 2) The application chain is registered in the cross-chain system.
[0022] Furthermore, the relay chain generates initialization parameters:
[0023] When the system is initialized, the relay chain generates the global parameters of the system to prepare for the registration of the application chain. The specific process is as follows:
[0024] ① The relay chain selects two large prime numbers p and q that satisfy the length, and q|p-1; then selects the group Generator g of intermediate order q;
[0025] ② The relay chain selects three different hash functions according to the solution requirements. 1 : H 2 : H 3 : Where L 1 is the length of the plaintext message, L 2 is the length of the identity ID;
[0026] ③Relay chain selects the master key Calculate P Pub =g s ; The relay chain then selects the secret value calculate The identity of the relay chain is recorded as ID C ,calculate y C =rC +sH 1 (ID C ,Y C );
[0027] ④Relay chain public parameters Save secret parameters SParams= <s,(x C ,y C )>.
[0028] Further, the registration method of the application chain in the cross-chain system:
[0029] First, according to the Liquid democracy algorithm, nodes in the independent blockchain vote to generate the cross-chain gateway DCCG. Then the relay chain generates the corresponding DID for the gateway, and saves the DID document to the IPFS identity authentication center to complete the registration. The DCCG gateway node will complete the message transmission between the application chain and the relay chain.
[0030] (1) Using the Liquid democracy algorithm, independent blockchain nodes vote to generate the gateway node DCCG:
[0031] ① A node can delegate all or part of its voting rights to other trusted nodes in the blockchain. The number of votes for each authorized node is the sum of all authorizations received;
[0032] ② The initial voting right of a node is 1 vote. Different weights can be set according to different node types. For example, the voting right of a verification node can be set to k votes.
[0033] ③ Each node that can vote will vote autonomously when voting for the gateway node. The number of votes includes the sum of the voting rights authorized by other nodes and its own voting rights;
[0034] ④ Each vote records the original voting weight it represents, and the top N nodes with the most votes will become the gateway node DCCG;
[0035] ⑤After the gateway node is elected, the original voting rights will be returned to each node. The blockchain will re-vote regularly to elect new gateway nodes.
[0036] (2) DCCG method for obtaining DID:
[0037] The relay chain first generates part of the parameters of the signature private key for DCCG, distributes the private key parameters to each DCCG node using the Shamir secret sharing scheme, and then generates the corresponding DID document:
[0038] ① The DCCG of the application chain selects the secret value through consensus calculate Send identity ID d , X D And the number of DCCG nodes n is given to the relay chain, and each node is recorded as N i (1≤i≤n);
[0039] ② Relay chain selects random number calculate y D =r D +sH 1 (ID d , Y D );
[0040] ③ The relay chain selects a finite field GF(p′) that satisfies p′>n, y d ∈GF(p′), select a t-1 degree polynomial: g(x)=a t-1 x t-1 +a t-2 x t-2 +…+a 2 x 2 +a 1 x+a 0 , where g(x)∈GF(p′)[x]; a 0 =y D ; The relay chain selects n different non-zero integers x in GF(p′) 1 , x 2 , …, x n , calculate: y i =g(x i ), i = 1, 2, ... n; then use each node N of DCCG i (1≤i≤n) The public key pair secret share (x i ,y i ) is encrypted to get (x′ i , y′ i ), (x′ i , y′ i ) is sent to DCCG and announced (X D , Y D ), x i (1≤i≤n);
[0041] ④ Each node i in DCCG uses the private key of the application chain to decrypt (x′ i , y′ i ), and then save your own secret share (x i ,y i );
[0042] ⑤The DID document generated by the relay chain for DCCG is did: relaychain:(XD , Y D ) and store the DID document in the IPFS identity authentication network.
[0043] Furthermore, the cross-chain user registration method in the relay chain:
[0044] If users in the application chain have cross-chain access needs, they must first register on the relay chain to obtain the keys and identities required for cross-chain access. The relay chain will generate a DID for the user and save the DID on the IPFS authentication network. The cross-chain user registration process on the relay chain includes two steps: the relay chain generates the user key and the relay chain generates the user DID;
[0045] 1) The relay chain generates user keys;
[0046] 2) The relay chain generates user DID;
[0047] The process of generating user keys in the relay chain is as follows:
[0048] ① User selects a secret value calculate Send identity ID u and X u To the relay chain;
[0049] ②The relay chain selects a secret number calculate y u =r u +sH 1 (ID u , Y u );Use the public key of the application chain where the user is located to convert Y u and u Encrypted and then sent to user ID u ;
[0050] ③User ID u Use the private key on the application chain to decrypt the received information and get Y u and u , and verify the equation Is it true? If true, user ID u Obtain the public-private key pair for the certificateless signcryption process <PK u =(X u , Y u ), SK u =(x u ,y u )>, User ID u The DID identifier of the cross-chain identity is: did: relaychain:(X u , Y u); if not, the registration fails.
[0051] Furthermore, the relay chain generates a user DID method:
[0052] Relay chain is user ID u Generate Y u and u , and returns it to the user. Then the relay chain constructs a cross-chain identity DID and DID document for the user. The specific steps are as follows:
[0053] ①Construct user DID identifier
[0054] The relay chain consists of user X u And the calculated Y u Construct a DID identifier in the form of: did: relaychain:(X u , Y u ); Each legitimate cross-chain user has a unique DID identifier;
[0055] ②Construct user DID document
[0056] The relay chain constructs the user's DID document according to the W3C standard, and then stores the DID document in the IPFS identity authentication network and records it with a Bloom filter.
[0057] Furthermore, the cross-chain identity authentication and transaction method:
[0058] The cross-chain interactor inputs the initial parameters and initiates cross-chain access, including cross-chain identity authentication and cross-chain contract call interaction, in which identity authentication and cross-chain contract call are carried out simultaneously. The process can be described as follows: There are two independent application chains A and B in the cross-chain system, and the relay chain is M; if Alice in chain A wants to call a contract in chain B, she first uses the private key and the public key of the destination chain DCCG to sign the call information to obtain σ 1 , and then the signcryption result σ 1 Use the private key and the public key of the relay chain to sign and encrypt to get σ 2 , forwarded to the relay chain through the DCCG of the blockchain. The relay chain decryption secret σ 2 After that, Alice's identity is authenticated and forwarded to 1 To the DCCG of the destination chain, the cross-chain gateway DCCG of the destination chain B decrypts the signature to obtain the call information, executes the cross-chain contract, and completes the cross-chain transaction.
[0059] In the present invention, since the signcryption algorithm and the decryption algorithm are used in multiple places, the signcryption process is modularized, which is described in detail as follows;
[0060] 1) Signcryption process
[0061] The certificateless signing process is as follows:
[0062] enter: <m,(X A , Y A ), (x A ,y A ), (X B ,y B ), ID a , ID b >
[0063] Output: <c 1 , c 2 , c 3 >
[0064] ①Let the message be m and the sender’s public key be (X A , Y A ), the private key is (x A ,y A ), the sender's registered identity is ID a ; The recipient's public key is (X B , Y B ), the receiver's registered identity is ID b ;
[0065] ②The sender chooses a secret number calculate Calculate d = H 2 (m,c 2 , ID a , ID b , X A , Y A ), then calculate v = d(y A +x A )+r 2 ,
[0066] Output the signcrypted ciphertext σ=(c 1 , c 2 , c 3 ). σ is the result of signing and encrypting the plaintext message m in one logical step.
[0067] 2) Decryption process
[0068] Received the signcrypted ciphertext σ=(c 1 , c 2 , c 3 ), the verifier performs the decryption process as follows:
[0069] Input: <σ, (X A , Y A ), (XB , Y B ), (x B ,y B ), ID a , ID b >
[0070] Output: <m>
[0071] ①Assume the sender's public key is (X A , Y A ), the sender's registered identity ID a ; The recipient's public key is (X B , Y B ), the private key is (x B ,y B ), the receiver's registered identity ID b ;
[0072] ② Calculation by the receiver H 3 (k′ 1 , k′ 2 , ID a , ID b ); then verify Is it true? If so, proceed to the next step, otherwise the verification fails;
[0073] ③ The receiver calculates d′=H 2 (m′,c 2 , ID a , ID b , X A , Y A ), then calculate verify Is it true? If so, m′ is the original message m, otherwise output a prompt message.
[0074] The cross-chain identity authentication and transaction process is as follows:
[0075] Assume that Alice initiates a cross-chain call, and the public key of user Alice is (X A , Y A ), the private key is (x A ,y A ), identity is ID a ; The public key of the relay chain is (X C , Y C ), the private key is (x C ,y C ), identity is ID c , the public key of the destination chain gateway DCCG (X D , Y D ), identity is ID d , DCCG stores the secret value x D , secret share y D It is stored in each node of the destination chain gateway DCCG in a secret sharing manner, and the public parameter x i , the secret share stored by node i is (x i ,y i ).
[0076] ① Alice constructs cross-chain transaction information locally, including the destination chain ID and transaction content, etc., recorded as message m;
[0077] ②Alice inputs parameters <m,(X A , Y A ), (x A ,y A ), (X D , Y D ), ID a , ID d >, execute the signcryption algorithm to obtain the signcrypted ciphertext σ 1 =(c 11 , c 12 , c 13 ); that is, the sender signs and encrypts the cross-chain interaction information, and only the DCCG of the destination chain has the corresponding key to decrypt the received contract call information;
[0078] ③ Alice input parameter <σ 1 ,(X A , Y A ), (x A ,y A ), (X C , Y C ), ID a , ID c >, execute the signcryption algorithm to obtain the signcrypted ciphertext σ 2 =(c 21 , c 22 , c 23 ), and σ 2 and its own DID identifier to the relay chain; that is, the sender signs and encrypts the cross-chain interaction information to obtain σ 2 , the relay chain can authenticate the sender, but does not know the content of the cross-chain contract;
[0079] ④ The relay chain obtains the public key of the user according to the DID identifier (X A , Y A ); Input parameter <σ 2 ,(X A , Y A ), (X C , Y C ), (y C ,y C ), ID a , ID c >Execute the decryption algorithm. If it is executed normally, it means that Alice has passed the identity authentication of the relay chain, and then the relay chain forwards σ 1 To the destination chain gateway DCCG; if it fails to execute normally, the relay chain will send a message of failure to execute to the source chain. In this process, the relay chain does not know the specific content of the cross-chain transaction;
[0080] ⑤After consensus, the destination chain’s gateway DCCG collects t secret shares (x i ,y i ), i = 1, 2, ..., t, calculate DCCG input parameters <σ 1 ,(X A , Y A ), (X D , Y D ), (x D ,y D ), ID a , ID d >, run the decryption algorithm, if the verification is successful, DCCG receives the transaction information m and executes the next step; otherwise, an exception is thrown and the verification fails;
[0081] ⑥ The DCCG of the destination chain executes the transaction, signs the result, and sends it to the relay chain. After verification by the relay chain, it is forwarded to the decentralized gateway DCCG of the source chain. After broadcasting, Alice receives the message and executes the decryption algorithm, and the cross-chain transaction is completed.
[0082] In combination with the above technical solutions and the technical problems solved, the advantages and positive effects of the technical solutions to be protected by the present invention are as follows:
[0083] In view of the problems of low decentralization, large number of resources required for identity authentication and poor scalability in the current cross-chain identity authentication, the present invention designs a cross-chain identity authentication scheme based on the certificateless signcryption algorithm. The scheme does not require a centralized public key certificate system, does not need to store digital certificates, does not need to verify digital certificates, and does not have the key escrow problem in the cross-chain scheme using the identity-based encryption algorithm. The present invention has the following characteristics: First, the user's private key is only known to the user himself, which maintains the decentralized characteristics of the cross-chain system. Second, the scheme utilizes the characteristics of the digital signcryption algorithm, which is more efficient in computing and communication than the traditional "sign first and then encrypt" scheme, and is more suitable for scenarios with limited resources in the cross-chain system. Third, the cross-chain digital identity identification of the scheme of the present invention complies with the DID specification of W3C, so that the identity authentication system of the scheme can connect to other participants in the cross-chain network and interconnect with other systems compatible with the DID standard, which well solves the scalability problem of the system. The present invention provides a new scheme for decentralized identity authentication in the cross-chain environment of blockchain.
[0084] The technical solution of the present invention solves the technical problems that people have been eager to solve but have never succeeded in solving: in general, it solves the problems of low decentralization, large resources required for identity authentication and poor scalability in cross-chain identity authentication.
[0085] The solution of the present invention abandons the centralized public key certificate system, so that only users know their private key information and maintain the decentralized nature of the cross-chain system. This design ensures that the user's identity and private key information will not be obtained by a third party, thereby improving the degree of decentralization and solving the centralization problem in traditional solutions. When a user generates a key, he only needs to privately generate a private key parameter x u , and then the public key parameter X is obtained by calculating the discrete logarithm problem u , ensuring that X u Calculate x u is not feasible. Then the user will use the public key parameter X u Sent to the relay chain, the relay chain uses the public key parameter X u Generate another private key parameter y for the user secret u and another public key parameter Y u , and finally returned to the user through a secure channel. In this key generation process, the relay chain only knows part of the user's private key parameter y u , and for the private key parameter x u Completely unaware, it can ensure that the user's private key is completely in the hands of the user, ensuring the complete decentralization of the identity private key in the cross-chain system.
[0086] The solution of the present invention innovatively uses digital signature as the basis in the cross-chain identity authentication system to construct an identity authentication process such as Figure 2 As shown in the figure, the logic is simple, the amount of calculation is reduced, and the signing and encryption can be completed in one logical step. The communication volume and computing cost are greatly improved compared with previous solutions. The scheme uses the characteristics of the digital signcryption algorithm, and has higher computing and communication efficiency than the traditional "sign first and then encrypt", and is more suitable for resource-constrained environments.
[0087] The cross-chain digital identity of the solution of the present invention complies with the W3C DID specification, so that the identity authentication system of this solution can connect with other participants in the cross-chain network and interconnect with other systems compatible with the DID standard, which well solves the scalability problem of the system. BRIEF DESCRIPTION OF THE DRAWINGS
[0088] Figure 1 It is a flow chart of a cross-chain identity authentication method based on certificateless signcryption provided by an embodiment of the present invention;
[0089] Figure 2 is a system architecture diagram provided by an embodiment of the present invention;
[0090] Figure 3 is a Liquid democracy voting flow chart provided by an embodiment of the present invention;
[0091] Figure 4 is a relationship diagram of the application chain, DCCG and relay chain provided by an embodiment of the present invention;
[0092] Figure 5 is a DCCG registration diagram provided by an embodiment of the present invention;
[0093] Figure 6 is a cross-chain identity authentication graph provided by an embodiment of the present invention;
[0094] Figure 7 It is a flow chart of message encryption, decryption and identity authentication provided by an embodiment of the present invention. DETAILED DESCRIPTION
[0095] In order to make the purpose, technical solution and advantages of the present invention more clearly understood, the present invention is further described in detail below in conjunction with the embodiments. It should be understood that the specific embodiments described herein are only used to explain the present invention and are not used to limit the present invention.
[0096] The blockchain cross-chain identity authentication method based on certificateless signature encryption proposed in the present invention can be implemented in a variety of practical application scenarios. The following are two specific embodiments and their implementation schemes:
[0097] Example 1: Cross-chain financial trading platform
[0098] 1) System initialization and application chain registration:
[0099] The relay chain generates initialization parameters, including selecting large prime numbers, group generators, defining hash functions, etc.
[0100] Application chain registration, including electing a cross-chain gateway (DCCG) and obtaining the corresponding DID.
[0101] 2) Cross-chain transaction initiation:
[0102] The user initiates a cross-chain financial transaction request on application chain A, targeting assets or services on application chain B.
[0103] The user uses his own private key and the DCCG public key of the target chain B to sign and generate a signed ciphertext.
[0104] 3) Identity authentication and transaction processing:
[0105] Relay chain M verifies the user's identity and forwards the signed ciphertext to the DCCG of target chain B.
[0106] The DCCG of target chain B decrypts the signature, executes the transaction after verifying the identity, and returns the result to the user.
[0107] 4) Security assurance:
[0108] All cross-chain transaction information is protected by a certificateless signature method to ensure the security and privacy of transactions.
[0109] The relay chain M does not know the specific content of the transaction and is only responsible for identity authentication and information forwarding, which enhances the security of the transaction.
[0110] Example 2: Supply Chain Management System
[0111] 1) Supply chain network construction:
[0112] Each party in the supply chain (such as manufacturers, logistics companies, and retailers) establishes an independent blockchain system and registers it to the relay chain.
[0113] Each blockchain system internally elects a cross-chain gateway (DCCG) and obtains the DID on the relay chain.
[0114] 2) Information sharing and trading:
[0115] Participants on each chain can share supply chain information such as inventory data, logistics information, order status, etc. through cross-chain interaction.
[0116] When cross-chain purchases, payments, and other operations are required, the relevant parties sign the transaction information and forward it through the relay chain.
[0117] 3) Identity authentication and data security:
[0118] All cross-chain interactions are authenticated and data encrypted through certificateless signature method to ensure the security and accuracy of information.
[0119] The relay chain is responsible for identity authentication, ensuring that only authorized participants can access and operate relevant data.
[0120] 4) Improved efficiency and reduced errors:
[0121] Digital supply chain management reduces the need for manual operations and improves overall operational efficiency.
[0122] Accurate data sharing and automated transaction processes reduce operational errors and improve the overall efficiency of the supply chain.
[0123] These two examples demonstrate the flexibility and efficiency of the blockchain cross-chain identity authentication method based on certificateless signature in different industry applications, and also reflect the huge potential of this technology in actual business environments.
[0124] The present invention mainly improves the following problems and defects of the prior art and achieves significant technical progress:
[0125] Security issues: Traditional cross-chain identity authentication methods may rely on a certificate system, which exposes the system to centralized trust issues and potential security vulnerabilities.
[0126] Inefficiency: Processing large amounts of identity authentication and data exchange in a multi-chain environment may result in inefficient processing speeds and high operating costs.
[0127] Interoperability issues: Communication and data exchange between different blockchains may be limited due to differences in technical standards and protocols, limiting the widespread application of blockchain technology.
[0128] In view of the problems existing in the prior art, the technical solution adopted by the present invention is: application of a certificateless signcryption scheme. By adopting a certificateless signcryption scheme, the present invention avoids the complexity and security risks of traditional certificate management and enhances the security of the system.
[0129] Design of relay chain and decentralized cross-chain gateway (DCCG): This structure not only improves the efficiency of cross-chain interaction, but also reduces dependence on a single centralized entity and enhances the degree of decentralization.
[0130] Using Liquid Democracy for DCCG elections: This democratic selection mechanism ensures the decentralization and transparency of the network while increasing the participation of community members and the overall health of the system.
[0131] like Figure 1 As shown, the present invention provides a blockchain cross-chain identity authentication method based on certificateless signature, comprising the following steps:
[0132] S101, system initialization and application chain registration;
[0133] The relay chain first generates the global system initial parameters. The nodes of the independent blockchain run the Liquid democracy voting contract to elect the decentralized cross-chain gateway DCCG. DCCG sends a registration request for the application chain to the relay chain, obtains the cross-chain key generated by the relay chain for it, and the DID document generated by the relay chain for the application chain. The relay chain stores the DID document in the IPFS system identity authentication center to complete the registration of the application chain.
[0134] S102, cross-chain users register on the relay chain;
[0135] After the application chain joins the cross-chain system, users on the chain can initiate a registration request to the relay chain. The two parties execute the agreement, and the user obtains the cross-chain key. The relay chain also generates a DID document for the user, and then stores the DID document in the IPFS system identity authentication center to complete the cross-chain user registration;
[0136] S103, cross-chain identity authentication and transactions;
[0137] Registered cross-chain users initiate cross-chain requests, requesting cross-chain calls to contracts on other application chains; the call request is forwarded by the DCCG of the initiator's chain to the relay chain, and the relay chain queries the DID document of the IPFS system identity authentication center through the initiator's DID for identity authentication. If the authentication is successful, the relay chain forwards the initiator's cross-chain request to the gateway DCCG of the destination chain, and the gateway DCCG of the destination chain verifies the legitimacy of the cross-chain call. If the verification is successful, the cross-chain transaction is executed. In this process, the relay chain does not know the plaintext information of the forwarded content during identity authentication.
[0138] The system initialization and application chain registration method provided by the present invention is as follows:
[0139] System initialization and application chain registration include two steps, namely, the relay chain generates system parameters and the application chain is registered in the cross-chain system. The present invention adopts an improved certificateless signcryption scheme based on discrete logarithms, which is more efficient and more suitable for environments with limited computing resources.
[0140] 1) The relay chain generates initialization parameters;
[0141] 2) The application chain is registered in the cross-chain system.
[0142] The method for generating initialization parameters of the relay chain provided by the present invention is as follows:
[0143] When the system is initialized, the relay chain generates the global parameters of the system to prepare for the registration of the application chain. The specific process is as follows:
[0144] ① The relay chain selects two large prime numbers p and q that satisfy the length, and q|p-1; then selects the group Generator g of intermediate order q;
[0145] ② The relay chain selects three different hash functions according to the solution requirements. 1 : H 2 : H 3 : Where L 1 is the length of the plaintext message, L 2 is the length of the identity ID;
[0146] ③Relay chain selects the master key Calculate P Pub =g s ; The relay chain then selects the secret value calculate The identity of the relay chain is recorded as ID C ,calculate y C =r C +sH 1 (ID C , Y C );
[0147] ④Relay chain public parameters Save secret parameters SParams= <s,(x C ,y C )>.
[0148] The registration method of the application chain provided by the present invention in the cross-chain system:
[0149] First, according to the Liquid democracy algorithm, nodes in the independent blockchain vote to generate the cross-chain gateway DCCG. Then the relay chain generates the corresponding DID for the gateway, and saves the DID document to the IPFS identity authentication center to complete the registration. The DCCG gateway node will complete the message transmission between the application chain and the relay chain.
[0150] (1) Using the Liquid democracy algorithm, independent blockchain nodes vote to generate the gateway node DCCG;
[0151] (2) The gateway node DCCG obtains the DID.
[0152] The present invention adopts the Liquid democracy algorithm, and independent blockchain nodes vote to generate DCCG:
[0153] ① A node can delegate all or part of its voting rights to other trusted nodes in the blockchain. The number of votes for each authorized node is the sum of all authorizations received;
[0154] ② The initial voting right of a node is 1 vote. Different weights can be set according to different node types. For example, the voting right of a verification node can be set to k votes.
[0155] ③ Each node that can vote will vote autonomously when voting for the gateway node. The number of votes includes the sum of the voting rights authorized by other nodes and its own voting rights;
[0156] ④ Each vote records the original voting weight it represents, and the top N nodes with the most votes will become the gateway node DCCG;
[0157] ⑤After the gateway node is elected, the original voting rights will be returned to each node. The blockchain will re-vote regularly to elect new gateway nodes.
[0158] The DCCG method for obtaining DID provided by the present invention:
[0159] The relay chain first generates part of the parameters of the signature private key for DCCG, distributes the private key parameters to each DCCG node using the Shamir secret sharing scheme, and then generates the corresponding DID document:
[0160] ① The DCCG of the application chain selects the secret value through consensus calculate Send identity ID d , X D And the number of DCCG nodes n is given to the relay chain, and each node is recorded as N i (1≤i≤n);
[0161] ② Relay chain selects random number calculate y D =r D +sH 1 (ID d , Y D );
[0162] ③ The relay chain selects a finite field GF(p′) that satisfies p′>n, y d ∈GF(p′), select a t-1 degree polynomial: g(x)=a t-1 x t-1 +a t-2 x t-2 +…+a 2 x 2 +a 1 x+a 0 , where g(x)∈GF(p′)[x]; a 0 =y D ; The relay chain selects n different non-zero integers x in GF(p′) 1 , x 2 , …, x n , calculate: y i =g(x i ), i = 1, 2, ... n; then use each node N of DCCG i (1≤i≤n) The public key pair secret share (x i ,y i ) is encrypted to get (x′ i , y′ i ), (x′ i , y′ i ) is sent to DCCG and announced (X D , Y D ), x i (1≤i≤n);
[0163] ④ Each node i in DCCG uses the private key of the application chain to decrypt (x′ i , y′ i ), and then save your own secret share (x i ,y i );
[0164] ⑤The DID document generated by the relay chain for DCCG is did: relaychain:(X D , Y D ) and store the DID document in the IPFS identity authentication network.
[0165] The cross-chain user registration method in the relay chain provided by the present invention:
[0166] If users in the application chain have cross-chain access needs, they must first register on the relay chain to obtain the keys and identities required for cross-chain access. The relay chain will generate a DID for the user and save the DID on the IPFS authentication network. The cross-chain user registration process on the relay chain includes two steps: the relay chain generates the user key and the relay chain generates the user DID;
[0167] 1) The relay chain generates user keys;
[0168] 2) Relay chain generates user DID
[0169] The process of generating user keys by the relay chain provided by the present invention is as follows:
[0170] The method for generating a key:
[0171] ① User selects a secret value calculate Send identity ID u and X u To the relay chain;
[0172] ②The relay chain selects a secret number calculate y u =r u +sH 1 (ID u , Y u );Use the public key of the application chain where the user is located to convert Y u and u Encrypted and then sent to user ID u ;
[0173] ③User ID u Use the private key on the application chain to decrypt the received information and get Y u and u , and verify the equation Is it true? If true, user ID u Obtain the public-private key pair for the certificateless signcryption process <PK u =(X u , Y u ), SK u =(x u ,y u )>, User ID u The DID identifier of the cross-chain identity is: did: relaychain:(X u , Y u ); if not, the registration fails.
[0174] The method for generating user DID by the relay chain provided by the present invention is as follows:
[0175] Relay chain is user ID u Generate Y u and u , and returns it to the user. Then the relay chain constructs a cross-chain identity DID and DID document for the user. The specific steps are as follows:
[0176] ①Construct user DID identifier
[0177] The relay chain consists of user X u And the calculated Y u Construct the user's DID identifier, which is in the form of: did: relaychain: (X u , Y u ); Each legitimate cross-chain user has a unique DID identifier;
[0178] ②Construct user DID document
[0179] The relay chain constructs the user's DID document according to the W3C standard, and then stores the DID document in the IPFS identity authentication network and records it with a Bloom filter.
[0180] The cross-chain identity authentication and transaction method provided by the present invention:
[0181] The cross-chain interactor inputs the initial parameters and initiates cross-chain access, including cross-chain identity authentication and cross-chain contract call interaction, in which identity authentication and cross-chain contract call are carried out simultaneously. The process can be described as follows: There are two independent application chains A and B in the cross-chain system, and the relay chain is M; if Alice in chain A wants to call a contract in chain B, she first uses the private key and the public key of the destination chain DCCG to sign the call information to obtain σ 1 , and then the signcryption result σ 1 Use the private key and the public key of the relay chain to sign and encrypt to get σ 2 , forwarded to the relay chain through the DCCG of the blockchain. The relay chain decryption secret σ 2 After that, Alice's identity is authenticated and forwarded to 1 To the DCCG of the destination chain, the cross-chain gateway DCCG of the destination chain B decrypts the signature to obtain the call information, executes the cross-chain contract, and completes the cross-chain transaction.
[0182] In the present invention, since the signcryption algorithm and the decryption algorithm are used in multiple places, the signcryption process is modularized, which is described in detail as follows;
[0183] 1) Signcryption process
[0184] The certificateless signing process is as follows:
[0185] enter: <m,(X A , Y A ), (x A ,y A ), (X B ,y B ), ID a , ID b >
[0186] Output: <c 1 , c 2 , c 3 >
[0187] ①Let the message be m and the sender’s public key be (X A , Y A ), the private key is (x A ,y A ), the sender's registered identity is ID a ; The recipient's public key is (X B , Y B ), the receiver's registered identity is ID b ;
[0188] ②The sender chooses a secret number calculate Calculate d = H 2 (m,c 2 , ID a , ID b , X A , Y A ), then calculate v = d(y A +x A )+r 2 ,
[0189] Output the signcrypted ciphertext σ=(c 1 , c 2 , c 3 ). σ is the result of signing and encrypting the plaintext message m in one logical step.
[0190] 2) Decryption process
[0191] Received the signcrypted ciphertext σ=(c 1 , c 2 , c 3 ), the verifier performs the decryption process as follows:
[0192] Input: <σ, (X A , Y A ), (X B , Y B ), (x B ,y B ), ID a , ID b >
[0193] Output: <m>
[0194] ①Assume the sender's public key is (X A , Y A ), the sender's registered identity ID a ; The recipient's public key is (X B , Y B ), the private key is (x B ,y B ), the receiver's registered identity ID b ;
[0195] ② Calculation by the receiver H 3 (k′ 1 , k′ 2 , ID a , ID b ); then verify Is it true? If so, proceed to the next step, otherwise the verification fails;
[0196] ③ The receiver calculates d′=H 2 (m′,c 2 , ID a , ID b , X A , Y A ), then calculate ω=X A d ·c 2 ;verify Is it true? If so, m′ is the original message m, otherwise output a prompt message.
[0197] The cross-chain identity authentication and transaction process is as follows:
[0198] Assume that Alice initiates a cross-chain call, and the public key of user Alice is (X A , Y A ), the private key is (x A ,y A ), identity is ID a ; The public key of the relay chain is (X C , Y C ), the private key is (x C ,y C ), identity is ID c , the public key of the destination chain gateway DCCG (X D , Y D ), identity is ID d , DCCG stores the secret value x D , secret share y D It is stored in each node of the destination chain gateway DCCG in a secret sharing manner, and the public parameter x i , the secret share stored by node i is (x i ,y i ).
[0199] ① Alice constructs cross-chain transaction information locally, including the destination chain ID and transaction content, etc., recorded as message m;
[0200] ②Alice inputs parameters <m,(X A , Y A ), (x A ,y A ), (X D , Y D ), ID a , ID d >, execute the signcryption algorithm to obtain the signcrypted ciphertext σ 1 =(c 11 , c 12 , c 13 ); that is, the sender signs and encrypts the cross-chain interaction information, and only the DCCG of the destination chain has the corresponding key to decrypt the received contract call information;
[0201] ③ Alice inputs parameter <σ 1 ,(X A , Y A ), (x A ,y A ), (X C , Y C ), ID a , ID c >, execute the signcryption algorithm to obtain the signcrypted ciphertext σ 2 =(c 21 , c 22 , c 23 ), and σ 2 and its own DID identifier to the relay chain; that is, the sender signs and encrypts the cross-chain interaction information to obtain σ 2 , the relay chain can authenticate the sender, but does not know the content of the cross-chain contract;
[0202] ④ The relay chain obtains the public key of the user according to the DID identifier (X A , Y A ); Input parameter <σ 2 ,(X A , Y A ), (X C , Y C ), (y C ,y C ), ID a , ID c >Execute the decryption algorithm. If it is executed normally, it means that Alice has passed the identity authentication of the relay chain, and then the relay chain forwards σ 1 To the destination chain gateway DCCG; if it fails to execute normally, the relay chain will send a message of failure to execute to the source chain. In this process, the relay chain does not know the specific content of the cross-chain transaction;
[0203] ⑤After consensus, the destination chain’s gateway DCCG collects t secret shares (x i ,y i ), i = 1, 2, ..., t, calculate DCCG input parameters <σ 1 ,(X A , Y A ), (X D , Y D ), (x D ,y D ), ID a , ID d >, run the decryption algorithm, if the verification is successful, DCCG receives the transaction information m and executes the next step; otherwise, an exception is thrown and the verification fails;
[0204] ⑥ The DCCG of the destination chain executes the transaction, signs the result, and sends it to the relay chain. After verification by the relay chain, it is forwarded to the decentralized gateway DCCG of the source chain. After broadcasting, Alice receives the message and executes the decryption algorithm, and the cross-chain transaction is completed.
[0205] Here, the correctness of the protocol in the invention is deduced, including three aspects: (1) the recovery of the shared key by the gateway DCCG when executing the cross-chain contract; (2) the decryption of the cross-chain message by the gateway DCCG; (3) the verification of the cross-chain message by the gateway DCCG.
[0206] (1) Recovery of shared keys by the gateway DCCG when executing cross-chain contracts
[0207] When the DCCG gateway registers in the system, the relay chain will allocate secret shares to each node of the DCCG according to the Shamir secret sharing algorithm. When the secret needs to be restored, each node will send the secret share to the DCCG gateway through a secure channel. Suppose the relay chain selects a t-1st degree polynomial: g(x) = a t-1 x t-1 +a t-2 x t-2 +…+a 2 x 2 +a 1 x+a 0 , where g(x)∈GF(p)[x]; a 0 =y D If t DCCG nodes send secret shares (x j ,y j ), j = 1, 2, ..., t to DCCG, according to the Lagrange interpolation formula:
[0208]
[0209] We get g(0)=y D =a 0 . Because x i (i=1, 2, ..., n) is public, and y i (i=1,2,…,n) is encrypted by the blockchain public key of each DCCG node. Only t DCCG nodes need to send secret shares to recover y D .
[0210] (2) Gateway DCCG decrypts cross-chain messages
[0211] because: So we know k′ 1 =k 1 , k′ 2 =k 2 ,like Then we can get m′=m, v′=v. Therefore, the gateway DCCG can decrypt the cross-chain message.
[0212] (3) Verification of cross-chain messages by the DCCG gateway
[0213] The verification process of the cross-chain message by the gateway DCCG is as follows.
[0214]
[0215] The cross-chain enterprise sales system is an innovative sales management system that aims to solve the problems of identity authentication and data interaction in the traditional enterprise sales process, and solve the challenges of data isolation, trust issues and centralization risks in the traditional enterprise sales system. The system adopts the cross-chain identity authentication scheme based on certificateless signature designed by the present invention, ensuring safe and efficient cross-chain identity authentication and data interaction.
[0216] System architecture Figure 2 As shown:
[0217] Front-end: Provides user interface, including login, registration, product display, order management and other functions.
[0218] Middleware: connects the front-end and the chain end, and handles tasks such as user requests, cross-chain interactions, and data transmission.
[0219] Chain end: A cross-chain environment built on blockchain technology, including relay chains and application chains.
[0220] Functional modules:
[0221] On-chain and off-chain storage modules: responsible for storing sales-related data on the blockchain to ensure that the data cannot be tampered with and is traceable. At the same time, large-capacity data is stored in traditional databases through off-chain storage modules to improve system performance and data processing efficiency.
[0222] File storage module: used to store and manage sales-related files, such as product documents, contract files, etc. The security and reliability of files are ensured through the combination of on-chain and off-chain storage.
[0223] On-chain and off-chain query module: provides query functions for sales data, including order status query, product information query, etc. Users can initiate query requests through the front-end interface, the middleware verifies the user's identity through the cross-chain identity authentication process, and then retrieves the corresponding data from the on-chain and off-chain storage modules and returns the results to the user.
[0224] Smart contract query module: A query function implemented using smart contract technology, such as triggering specific contract logic based on the user's purchase behavior, automatically calculating discounts or pushing relevant product information to the user.
[0225] Cross-chain identity authentication module: This module is the core module of the system, which implements all interfaces of the above modules and uses the present invention as the underlying algorithm to achieve cross-chain interaction and identity authentication.
[0226] Application Process:
[0227] System initialization: According to the present invention, the relay chain is initialized according to the initialization algorithm to ensure the normal operation of the cross-chain system.
[0228] When the system is initialized, the relay chain generates the global parameters of the system to prepare for the registration of the application chain. The specific process is as follows:
[0229] ① The relay chain selects two large prime numbers p and q that satisfy the length, and q|p-1; then selects the group Generator g of intermediate order q;
[0230] ② The relay chain selects three different hash functions according to the solution requirements. 1 : H 2 : H 3 : Where L 1 is the length of the plaintext message, L 2 is the length of the identity ID;
[0231] ③Relay chain selects the master key Calculate P Pub =g s ; The relay chain then selects the secret value calculate The identity of the relay chain is recorded as ID C ,calculate y C =r C +sH 1 (ID C , Y C );
[0232] ④Relay chain public parameters Save secret parameters SParams= <s,(x C ,y C )>.
[0233] Application chain is registered in the cross-chain system: When a new blockchain requests to join the cross-chain system, it is registered according to the application chain registration process described in this invention to ensure the effective joining of the new chain:
[0234] First, according to the Liquid democracy algorithm, nodes in the independent blockchain vote to generate the cross-chain gateway DCCG. Then the relay chain generates the corresponding DID for the gateway, and saves the DID document to the IPFS identity authentication center to complete the registration. The DCCG gateway node will complete the message transmission between the application chain and the relay chain.
[0235] (1) The nodes of the independent blockchain vote to generate the gateway node DCCG, using the Liquid democracy algorithm. The algorithm process is as follows: Figure 3 shown.
[0236] ① A node can delegate all or part of its voting rights to other trusted nodes in the blockchain. The number of votes for each authorized node is the sum of all authorizations received;
[0237] ② The initial voting right of a node is 1 vote. Different weights can be set according to different node types. For example, the voting right of a verification node can be set to k votes.
[0238] ③ Each node that can vote will vote autonomously when voting for the gateway node. The number of votes includes the sum of the voting rights authorized by other nodes and its own voting rights;
[0239] ④ Each vote records the original voting weight it represents, and the top N nodes with the most votes will become the gateway node DCCG;
[0240] ⑤After the gateway node is elected, the original voting rights will be returned to each node. The blockchain will re-vote regularly to elect new gateway nodes.
[0241] After the application chain successfully elects the DCCG node, the relationship between the application chain, relay chain, DCCG and cross-chain system is as follows: Figure 4 As shown, the DCCG of the application chain not only belongs to the application chain, but also is part of the cross-chain system together with the relay chain.
[0242] (2) Gateway node DCCG obtains DID
[0243] The relay chain first generates part of the parameters of the signature private key for DCCG, distributes the private key parameters to each DCCG node using the Shamir secret sharing scheme, and then generates the corresponding DID document. The timing diagram of this process is as follows Figure 5 As shown, the specific steps are as follows:
[0244] ①After consensus, the DCCG of the application chain selects the secret value calculate Send identity ID d , X D And the number of DCCG nodes n is given to the relay chain, and each node is recorded as N i (1≤i≤n).
[0245] ② Relay chain selects random number calculate y D =r D +sH 1 (ID d , Y D );
[0246] ③ The relay chain selects a finite field GF(p′) that satisfies p′>n, y D ∈GF(p′), select a t-1 degree polynomial: g(x)=a t-1 x t-1 +a t-2 x t-2 +…+a 2 x 2 +a 1 x+a 0 , where g(x)∈GF(p′)[x]; a 0 =y D ; The relay chain selects n different non-zero integers x in GF(p′) 1 , x 2 , …, x n , calculate: y i =g(x i ), i = 1, 2, ... n. Then use each node N of DCCG i (1≤i≤n) The public key pair secret share (x i ,y i ) is encrypted to get (x′ i , y′ i ), (x′ i , y′ i ) is sent to DCCG and announced (X D , Y D ), x i (1≤i≤n);
[0247] ④ Each node i in DCCG uses the private key of the application chain to decrypt (x′ i , y′ i ), and then save your own secret share (x i ,y i );
[0248] ⑤The DID document generated by the relay chain for DCCG is did: relaychain:(X D , Y D ) and store the DID document in the IPFS identity authentication network.
[0249] User registration: When a new user joins the system, identity authentication and registration are performed according to the user registration process described in the present invention to ensure the security and uniqueness of the user identity.
[0250] 1) Generate a key
[0251] ① User selects a secret value calculate Send identity ID u and X u To the relay chain;
[0252] ②The relay chain selects a secret number calculate y u =r u +sH 1 (ID u , Y u ). Use the public key of the application chain to which the user belongs to convert Y u and u Encrypted and then sent to user ID u ;
[0253] ③User ID u Use the private key on the application chain to decrypt the received information and get Y u and u , and verify the equation Is it true? If true, user ID u Obtain the public-private key pair for the certificateless signcryption process <PK u =(X u , Y u ), SK u =(x u ,y u )>, User ID u The DID identifier of the cross-chain identity is: did: relaychain:(X u , Y u ); if not, the registration fails.
[0254] 2) Relay chain generates user DID
[0255] Relay chain is user ID u Generate Y u and u , and returns it to the user. Then the relay chain constructs a cross-chain identity DID and DID document for the user. The specific steps are as follows:
[0256] ①Construct user DID identifier
[0257] The relay chain consists of user X u And the calculated Y u Construct the user's DID identifier, which is in the form of: did: relaychain: (X u , Y u ); Each legitimate cross-chain user has a unique DID identifier;
[0258] ②Construct user DID document
[0259] The relay chain constructs the user's DID document according to the W3C standard, and then stores the DID document in the IPFS identity authentication network and records it with a Bloom filter.
[0260] Cross-chain identity authentication and transaction process:
[0261] When cross-chain interaction occurs, the cross-chain identity authentication process described in the present invention is executed to ensure the legitimacy of the identities of both parties to the interaction and the security of data transmission.
[0262] Signcryption process modularization:
[0263] In the present invention, since the signcryption algorithm and the decryption algorithm are used in multiple places, the signcryption process is modularized, which is described in detail as follows;
[0264] 1) Signcryption process
[0265] The certificateless signing process is as follows:
[0266] enter: <m,(X A , Y A ), (x A ,y A ), (X B , Y B ), ID a , ID b >
[0267] Output: <c 1 , c 2 , c 3 >
[0268] ①Let the message be m and the sender’s public key be (X A , Y A ), the private key is (x A ,y A ), the sender's registered identity is ID a ; The recipient's public key is (X B , Y B ), the receiver's registered identity is ID b ;
[0269] ②The sender chooses a secret number calculate Calculate d = H 2 (m,c 2 , ID a , ID b , X A , Y A ), then calculate v = d(y A +x A )+r 2 ,
[0270] Output the signcrypted ciphertext σ=(c 1 , c 2 , c 3 ). σ is the result of signing and encrypting the plaintext message m in one logical step.
[0271] 2) Decryption process
[0272] Received the signcrypted ciphertext σ=(c 1 , c 2 , c 3 ), the verifier performs the decryption process as follows:
[0273] Input: <σ, (X A , Y A ), (X B , Y B ), (x B ,y B ), ID a , ID b >
[0274] Output: <m>
[0275] ①Assume the sender's public key is (X A , Y A ), the sender's registered identity ID a ; The recipient's public key is (X B , Y B ), the private key is (x B ,y B ), the receiver's registered identity ID b ;
[0276] ② Calculation by the receiver H 3 (k′ 1 , k′ 2 , ID a , ID b ); then verify Is it true? If so, proceed to the next step, otherwise the verification fails;
[0277] ③ The receiver calculates d′=H 2 (m′,c 2 , ID a , ID b , X A , Y A ), then calculate ω=X A d ·c 2 ;verify Is it true? If so, m′ is the original message m, otherwise output a prompt message.
[0278] The cross-chain identity authentication and transaction process is as follows:
[0279] Assume that Alice initiates a cross-chain call, and the public key of user Alice is (X A , Y A ), the private key is (x A ,y A ), identity is ID a ; The public key of the relay chain is (X C , Y C ), the private key is (x C ,y C ), identity is ID c , the public key of the destination chain gateway DCCG (X D , Y D ), identity is ID d , DCCG stores the secret value x D , secret share y D It is stored in each node of the destination chain gateway DCCG in a secret sharing manner, and the public parameter x i , the secret share stored by node i is (x i ,y i ). Steps as Figure 6 , the detailed steps are as follows:
[0280] ① Alice constructs cross-chain transaction information locally, including the destination chain ID and transaction content, etc., recorded as message m;
[0281] ②Alice inputs parameters <m,(X A , Y A ), (x A ,y A ), (X D , Y D ), ID a , ID d >, execute the signcryption algorithm to obtain the signcrypted ciphertext σ 1 =(c 11 , c 12 , c 13 ); that is, the sender signs and encrypts the cross-chain interaction information, and only the DCCG of the destination chain has the corresponding key to decrypt the received contract call information;
[0282] ③ Alice inputs parameter <σ 1 ,(X A , Y A ), (x A ,y A ), (X C , Y C ), ID a , ID c >, execute the signcryption algorithm to obtain the signcrypted ciphertext σ 2 =(c 21 , c 22 , c 23 ), and σ 2 and its own DID identifier to the relay chain; that is, the sender signs and encrypts the cross-chain interaction information to obtain σ 2 , the relay chain can authenticate the sender, but does not know the content of the cross-chain contract;
[0283] ④ The relay chain obtains the public key of the user according to the DID identifier (X A , Y A ); Input parameter <σ 2 ,(X A , Y A ), (X C , Y C ), (y C ,y C ), ID a , ID c >Execute the decryption algorithm. If it is executed normally, it means that Alice has passed the identity authentication of the relay chain, and then the relay chain forwards σ 1 To the destination chain gateway DCCG; if it fails to execute normally, the relay chain will send a message of failure to execute to the source chain. In this process, the relay chain does not know the specific content of the cross-chain transaction;
[0284] ⑤After consensus, the destination chain’s gateway DCCG collects t secret shares (x i ,y i ), i = 1, 2, ..., t, calculate DCCG input parameters <σ 1 ,(X A , Y A ), (X D , Y D ), (x D ,y D ), ID a , ID d >, run the decryption algorithm, if the verification is successful, DCCG receives the transaction information m and executes the next step; otherwise, an exception is thrown and the verification fails;
[0285] ⑥ The DCCG of the destination chain executes the transaction, signs the result, and sends it to the relay chain. After verification by the relay chain, it is forwarded to the decentralized gateway DCCG of the source chain. After broadcasting, Alice receives the message and executes the decryption algorithm, and the cross-chain transaction is completed.
[0286] This solution ensures that the relay chain cannot learn the actual transaction content while forwarding information, and protects transaction privacy under the premise of completing cross-chain identity authentication.
[0287] In view of the problems of low decentralization, large number of resources required for identity authentication and poor scalability in the current cross-chain identity authentication, the present invention designs a cross-chain identity authentication scheme based on the certificateless signcryption algorithm. The scheme does not require a centralized public key certificate system, does not need to store digital certificates, does not need to verify digital certificates, and does not have the key escrow problem in the cross-chain scheme using the identity-based encryption algorithm. The present invention has the following characteristics: First, the user's private key is only known to the user himself, which maintains the decentralized characteristics of the cross-chain system. Second, the scheme utilizes the characteristics of the digital signcryption algorithm, which is more efficient in computing and communication than the traditional "sign first and then encrypt" scheme, and is more suitable for scenarios with limited resources in the cross-chain system. Third, the cross-chain digital identity identification of the scheme of the present invention complies with the DID specification of W3C, so that the identity authentication system of the scheme can connect to other participants in the cross-chain network and interconnect with other systems compatible with the DID standard, which well solves the scalability problem of the system. The present invention provides a new scheme for decentralized identity authentication in the cross-chain environment of blockchain.
[0288] It should be noted that the embodiments of the present invention can be implemented by hardware, software, or a combination of software and hardware. The hardware part can be implemented using dedicated logic; the software part can be stored in a memory and executed by an appropriate instruction execution system, such as a microprocessor or dedicated design hardware. It can be understood by a person of ordinary skill in the art that the above-mentioned devices and methods can be implemented using computer executable instructions and / or contained in a processor control code, such as a carrier medium such as a disk, CD or DVD-ROM, a programmable memory such as a read-only memory (firmware), or a data carrier such as an optical or electronic signal carrier. Such code is provided on the carrier medium. The device and its modules of the present invention can be implemented by hardware circuits such as very large-scale integrated circuits or gate arrays, semiconductors such as logic chips, transistors, etc., or programmable hardware devices such as field programmable gate arrays, programmable logic devices, etc., can also be implemented by software executed by various types of processors, and can also be implemented by a combination of the above-mentioned hardware circuits and software, such as firmware.
[0289] Specifically, the current cross-chain identity authentication generally has the problem of low decentralization. Among the cross-chain identity authentication schemes currently published, most cross-chain identity authentication schemes adopt the traditional Web2 Internet-based PKI certificate and IBE identity-based authentication. In the PKI system, there is inevitably the problem of third-party institutions storing and verifying the legitimacy of public key certificates, and in the IBE system, there is inevitably the problem of third-party institutions hosting keys. The scheme of the present invention innovatively builds a set of key generation, identity storage, signature encryption, message decryption, identity authentication, and cross-chain interaction processes in the cross-chain identity authentication system based on the certificateless public key cryptography system, and completely gets rid of the problem of low decentralization of traditional schemes in this complete process. Traditional identity authentication schemes usually rely on a centralized public key certificate system, which leads to the centralization of the identity authentication process and the problem of trusting a single institution. The scheme of the present invention abandons the centralized public key certificate system, so that only users know their private key information and maintain the decentralized characteristics of the cross-chain system. This design ensures that the user's identity and private key information will not be obtained by a third party, thereby improving the degree of decentralization and solving the centralization problem in traditional schemes. The user generates a key by privately generating a private key parameter x u , and then the public key parameter X is obtained by calculating the discrete logarithm problem u , ensuring that X u Calculate x u is not feasible. Then the user will use the public key parameter X u Sent to the relay chain, the relay chain uses the public key parameter X u Generate another private key parameter y for the user secret u and another public key parameter Y u , and finally returned to the user through a secure channel. In this key generation process, the relay chain only knows part of the user's private key parameter y u , and for the private key parameter x u Completely unaware, it can ensure that the user's private key is completely in the hands of the user, ensuring the complete decentralization of the identity private key in the cross-chain system.
[0290] The current cross-chain identity authentication schemes generally have the problem of high resource overhead. As mentioned above, most of the current cross-chain identity authentication schemes are based on traditional PKI or IBE systems, and usually adopt a signature-first-then-encryption scheme, that is, the sender needs to first use the sender's private key to sign the message m to obtain the signature σ, and then use the random symmetric key k to symmetrically encrypt the combination of m and σ to obtain c1, and then use the recipient's public key to encrypt k to obtain c2, and finally send c1 and c2 to the receiver. When the receiver obtains c1 and c2, he first uses the receiver's private key to decrypt c2 with the public key to obtain k, and then uses k to symmetric decrypt c1 to obtain the combination of message m and signature σ, and finally uses the sender's public key to verify the legitimacy of the signature to verify the sender's identity. In this traditional step, identity authentication, data integrity and non-repudiation can be achieved, but it requires a private key signature, a public key encryption, a private key decryption, a public key verification signature and a symmetric encryption and decryption. The result of each step is the input of the next step. The entire process is executed serially, and has the disadvantages of many calculation steps and lack of parallel computing capabilities, which ultimately leads to high resource overhead and low time efficiency.
[0291] The solution of the present invention innovatively uses digital signature as the basis for the cross-chain identity authentication system to construct an identity authentication process such as Figure 7 As shown in the figure, the logic is simple, the amount of calculation is reduced, the signing and encryption can be completed in one logical step, and the communication volume and computing cost are greatly improved compared with previous solutions. The scheme uses the characteristics of the digital signcryption algorithm, and has higher computing and communication efficiency than the traditional "sign first and then encrypt", and is more suitable for resource-constrained environments. This means that limited resources can be used more effectively, reducing resource overhead, and solving the problem of large resource overhead in traditional solutions.
[0292] Finally, some cross-chain identity authentication schemes do not follow the decentralized identifier (DID) standard established by the World Wide Web Consortium (W3C), lack flexibility and scalability, and cannot be interconnected with other systems. These non-standard identity IDs have certain limitations, such as the lack of a unified identity identification space and difficulties in cross-chain mapping, which reduces the scalability and interoperability of the overall framework of the proposed scheme. The cross-chain digital identity of the scheme of the present invention complies with the DID specification of W3C, so that the identity authentication system of this scheme can connect to other participants in the cross-chain network and interconnect with other systems compatible with the DID standard, which solves the scalability problem of the system well.
[0293] The above description is only a specific implementation mode of the present invention, but the protection scope of the present invention is not limited thereto. Any modifications, equivalent substitutions and improvements made by any technician familiar with the technical field within the technical scope disclosed by the present invention and within the spirit and principle of the present invention should be covered by the protection scope of the present invention.< / m> < / m> < / m>
Claims
1. A blockchain cross-chain identity authentication method based on certificateless signature, characterized in that: The following steps are involved: Step 1: System initialization and application chain registration; The relay chain first generates the initial parameters of the global system; the nodes of the independent blockchain run the Liquid democracy voting contract to elect the decentralized cross-chain gateway DCCG. DCCG sends a registration request for the application chain to the relay chain, obtains the cross-chain key generated by the relay chain for it, and the DID document generated by the relay chain for the application chain; the relay chain stores the DID document in the IPFS system identity authentication center to complete the registration of the application chain; Step 2: Cross-chain users register on the relay chain; After the application chain joins the cross-chain system, users on the chain can initiate registration requests to the relay chain. The two parties execute the agreement, and the user obtains the cross-chain key. The relay chain also generates a DID document for the user, and then stores the DID document in the IPFS system identity authentication center to complete the cross-chain user registration. Step 3: Cross-chain identity authentication and transaction; Registered cross-chain users initiate cross-chain requests, requesting cross-chain calls to contracts on other application chains; the call request is forwarded by the DCCG of the initiator's chain to the relay chain, and the relay chain queries the DID document of the IPFS system identity authentication center through the initiator's DID for identity authentication; If the authentication is successful, the relay chain will forward the initiator’s cross-chain request to the destination chain’s gateway DCCG. The destination chain’s gateway DCCG will verify the legitimacy of the cross-chain call. If the verification is successful, the cross-chain transaction will be executed. In this process, the relay chain does not know the plaintext information of the forwarded content during identity authentication.
2. The blockchain cross-chain identity authentication method based on certificateless signcryption as claimed in claim 1, characterized in that: The system initialization and application chain registration method is as follows: System initialization and application chain registration include two steps, namely, the relay chain generates system parameters and the application chain is registered in the cross-chain system. The present invention adopts an improved certificateless signcryption scheme based on discrete logarithms, which is more efficient and more suitable for environments with limited computing resources. 1) The relay chain generates initialization parameters; 2) The application chain is registered in the cross-chain system.
3. The blockchain cross-chain identity authentication method based on certificateless signcryption as claimed in claim 2, characterized in that: The relay chain generates initialization parameters: When the system is initialized, the relay chain generates the global parameters of the system to prepare for the registration of the application chain; the specific process is as follows: ① The relay chain selects two large prime numbers p and q that satisfy the length, and q|p-1; then selects the group Generator g of intermediate order q; ② The relay chain selects three different hash functions according to the needs of the solution. Where L1 is the length of the plaintext message, and L2 is the length of the identity ID; ③Relay chain selects the master key Calculate P Pub =g s ; The relay chain then selects the secret value calculate The identity of the relay chain is recorded as ID C ,calculate y C =r C +sH1(ID C , Y C ); ④Relay chain public parameters Save secret parameters SParams= <s,(x C ,y C )>.
4. The blockchain cross-chain identity authentication method based on certificateless signature as claimed in claim 2, characterized in that: The registration method of the application chain in the cross-chain system: First, according to the Liquid democracy algorithm, nodes in the independent blockchain vote to generate the cross-chain gateway DCCG. Then the relay chain generates the corresponding DID for the gateway, and saves the DID document to the IPFS identity authentication center to complete the registration. The DCCG gateway node will complete the message transmission between the application chain and the relay chain. (1) Using the Liquid democracy algorithm, nodes of independent blockchains vote to generate DCCG; (2) The gateway node DCCG obtains the DID.
5. The blockchain cross-chain identity authentication method based on certificateless signature encryption as claimed in claim 4, characterized in that: The Liquid democracy algorithm is used, and nodes vote to generate the gateway node DCCG: ① A node can delegate all or part of its voting rights to other trusted nodes in the blockchain. The number of votes for each authorized node is the sum of all authorizations received; ② The initial voting right of a node is 1 vote. Different weights can be set according to different node types. For example, the voting right of a verification node can be set to k votes. ③ Each node that can vote shall vote autonomously when voting for the gateway node; the number of votes includes the sum of the voting rights authorized by other nodes and its own voting rights; ④ Each vote records the original voting weight it represents, and the top N nodes with the most votes will become the gateway node DCCG; ⑤After the gateway node election, the original voting rights will be returned to each node; the blockchain will re-vote regularly to elect new gateway nodes.
6. The blockchain cross-chain identity authentication method based on certificateless signcryption as claimed in claim 4, characterized in that: The gateway node DCCG obtains the DID method: The relay chain first generates part of the parameters of the signature private key for DCCG, distributes the private key parameters to each DCCG node using the Shamir secret sharing scheme, and then generates the corresponding DID document: ①After consensus, the DCCG of the application chain selects the secret value calculate Send identity ID d , X D And the number of DCCG nodes n is given to the relay chain, and each node is recorded as N i (1≤i≤n); 3. Relay Chain Selection Random Number calculate y D =r D +sH1(ID d ,Y D ); ③The relay chain selects a finite field GF(p') that satisfies p'>n,y d ∈GF(p'), select a t-1 degree polynomial: g(x)=a t- 1x t-1 +a t-2 x t-2 +…+a2x 2 +a1x+a0, where g(x)∈GF(p')[x]; a0=y D ; The relay chain selects n different non-zero integers x1, x2, …, x in GF(p') n , calculate: y i =g(x i ), i = 1, 2, ... n; then use each node N of DCCG i (1≤i≤n) The public key pair secret share (x i ,y i ) is encrypted to get (x' i ,y' i ), (x' i ,y' i ) is sent to DCCG and announced (X D ,Y D ),x i (1≤i≤n); ④ Each node i in DCCG uses the private key of the application chain to decrypt (x' i ,y' i ), and then save your own secret share (x i ,y i ); ⑤The DID document generated by the relay chain for DCCG is did:relaychain:(X D ,Y D ) and store the DID document in the IPFS identity authentication network.
7. The blockchain cross-chain identity authentication method based on certificateless signcryption as claimed in claim 1, characterized in that: The cross-chain user registration method in the relay chain: If users in the application chain have cross-chain access requirements, they must first register on the relay chain to obtain the keys and identities required for cross-chain access; the relay chain will generate a DID for the user and save the DID on the IPFS authentication network; The registration process of cross-chain users on the relay chain includes two steps: the relay chain generates the user key and the relay chain generates the user DID; 1) The relay chain generates user keys; 2) The relay chain generates user DID.
8. The blockchain cross-chain identity authentication method based on certificateless signcryption as claimed in claim 7, characterized in that: The relay chain generates user keys: ① User selects a secret value calculate Send identity ID u and X u To the relay chain; ②The relay chain selects a secret number calculate y u =r u +sH1(ID u ,Y u );Use the public key of the user's application chain to convert Y u and u Encrypted and then sent to user ID u ; ③User ID u Use the private key on the application chain to decrypt the received information and get Y u and u , and verify the equation Is it true? If true, user ID u Obtain the public-private key pair for the certificateless signcryption process <PK u =(X u ,Y u ),SK u =(x u ,y u )>, User ID u The DID identifier of the cross-chain identity is: did:relaychain:(X u ,Y u ); if not, the registration fails.
9. The blockchain cross-chain identity authentication method based on certificateless signcryption as claimed in claim 7, characterized in that: The relay chain generates user DID method: Relay chain is user ID u Generate Y u and u , and returns it to the user; then the relay chain constructs a cross-chain identity DID and DID document for the user. The specific steps are as follows: ①Construct user DID identifier The relay chain consists of user X u And the calculated Y u Construct a DID identifier in the form of: did:relaychain:(X u ,Y u ); Each legitimate cross-chain user has a unique DID identifier; ②Construct user DID document The relay chain constructs the user's DID document according to the W3C standard, and then stores the DID document in the IPFS identity authentication network and records it with a Bloom filter.
10. The blockchain cross-chain identity authentication method based on certificateless signature according to claim 1, characterized in that: The cross-chain identity authentication and transaction method: The cross-chain interactor inputs the initial parameters and initiates cross-chain access, including cross-chain identity authentication and cross-chain contract call interaction, in which identity authentication and cross-chain contract call are carried out simultaneously; the process can be described as follows: there are two independent application chains A and B in the cross-chain system, and the relay chain is M; If Alice in chain A wants to call a contract in chain B, she first uses the private key and the public key of the destination chain DCCG to sign the call information to obtain σ1, and then signs the sign-encrypted result σ1 with the private key and the public key of the relay chain to obtain σ2, which is forwarded to the relay chain through the DCCG of the blockchain where it is located; the relay chain decrypts σ2 and authenticates Alice's identity. After the authentication is passed, it forwards σ1 to the DCCG of the destination chain. The cross-chain gateway DCCG of the destination chain B decrypts the sign-encrypted information to obtain the call information, executes the cross-chain contract, and completes the cross-chain transaction; In the present invention, since the signcryption algorithm and the decryption algorithm are used in multiple places, the signcryption process is modularized, which is described in detail as follows; 1) Signcryption process The certificateless signing process is as follows: Input: <m, (X A , Y A ), (x A , y A ), (X B , Y B ), ID a , ID b > Output:<c1,c2,c3> ①Let the message be m and the sender’s public key be (X A ,Y A ), the private key is (x A ,y A ), the sender's registered identity is ID a ; The recipient's public key is (X B ,Y B ), the receiver's registered identity is ID b ; ②The sender chooses a secret number calculate Calculate d = H2(m,c2,ID a ,ID b ,X A ,Y A ), then calculate Output the signcrypted ciphertext σ = (c1, c2, c3); σ is the result of signing and encrypting the plaintext message m in one logical step; 2) Decryption process After receiving the signcrypted ciphertext σ=(c1,c2,c3), the verifier performs the decryption process as follows: Input: <σ,(X A ,Y A ),(X B ,Y B ),(x B ,y B ),ID a ,ID b > Output: <m>< / m> ①Assume the sender's public key is (X A ,Y A ), the sender's registered identity ID a ; The recipient's public key is (X B ,Y B ), the private key is (x B ,y B ), the identity ID registered by the receiver b ; ② Calculation by the receiver H3(k'1,k'2,ID a ,ID b ); then verify Is it true? If so, proceed to the next step, otherwise the verification fails; ③ The receiver calculates d'=H2(m',c2,ID a ,ID b ,X A ,Y A ), then calculate verify Is it true? If so, m' is the original message m, otherwise output a prompt message; The cross-chain identity authentication and transaction process is as follows: Assume that Alice initiates a cross-chain call, and the public key of user Alice is (X A ,Y A ), the private key is (x A ,y A ), identity is ID a ; The public key of the relay chain is (X C ,Y C ), the private key is (x C ,y C ), identity is ID c , the public key of the destination chain gateway DCCG (X D ,Y D ), identity is ID d , DCCG stores the secret value x D , secret share y D It is stored in each node of the destination chain gateway DCCG in a secret sharing manner, and the public parameter x i , the secret share stored by node i is (x i ,y i ); ① Alice constructs cross-chain transaction information locally, including the destination chain ID and transaction content, etc., recorded as message m; ②Alice inputs parameters <m,(X A ,Y A ),(x A ,y A ),(X D ,Y D ),ID a ,ID d >, execute the signcryption algorithm to obtain the signcrypted ciphertext σ1=(c 11 ,c 12 ,c 13 ); that is, the sender signs and encrypts the cross-chain interaction information, and only the DCCG of the destination chain has the corresponding key to decrypt the received contract call information; ③ Alice inputs parameter <σ1,(X A ,Y A ),(x A ,y A ),(X C ,Y C ),ID a ,ID c >, execute the signcryption algorithm to obtain the signcrypted ciphertext σ2=(c 21 ,c 22 ,c 23 ), sends σ2 and its own DID identifier to the relay chain; that is, the sender signs and encrypts the cross-chain interaction information to obtain σ2. The relay chain can authenticate the sender, but does not know the content of the cross-chain contract; ④ The relay chain obtains the public key of the user according to the DID identifier (X A ,Y A ); Input parameter <σ2,(X A ,Y A ),(X C ,Y C ),(y C ,y C ),ID a ,ID c >Execute the decryption algorithm; if it is executed normally, it means that Alice has passed the identity authentication of the relay chain, and then the relay chain forwards σ1 to the destination chain gateway DCCG; if it fails to execute normally, the relay chain will send a message to the source chain that it failed to execute; in this process, the relay chain does not know the specific content of the cross-chain transaction; ⑤After consensus, the destination chain’s gateway DCCG collects t secret shares (x i ,y i ),i=1,2,…,t, calculate DCCG input parameters <σ1,(X A ,Y A ),(X D ,Y D ),(x D ,y D ),ID a ,ID d >, Run the decryption algorithm. If the verification of the signcryption is successful, DCCG receives the transaction information m and executes the next step. Otherwise, an exception is thrown and the verification fails. ⑥ The DCCG of the destination chain executes the transaction, signs the result, and sends it to the relay chain; after verification, the relay chain forwards it to the decentralized gateway DCCG of the source chain; after broadcasting, Alice receives the message and executes the decryption algorithm, and the cross-chain transaction is completed.
Citation Information
Cited By
Distributed anonymous transaction method for realizing joint supervision
CN119941253A
Security identity authentication method and system for alliance chain cross-chain interoperation scene
CN120602096A
A security identity authentication method and system for alliance chain cross-chain interoperability scenarios
CN120602096B
