Quantum key distribution-based notary cross-chain transaction method
By dividing the notary node into transaction nodes and verification nodes, and using quantum key distribution technology to generate encryption keys, the problems of low efficiency and insufficient security in cross-chain transactions are solved, and efficient and secure are achieved cross-chain transaction process.
Patent Information
- Application Number
- CN202410999119.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-07-24
- Publication Date
- 2024-11-08
AI Technical Summary
The traditional notary mechanism has efficiency problems in cross-chain transactions and cannot withstand the security threat of quantum attacks, resulting in low transaction efficiency and insufficient security.
Using the notary cross-chain trading method based on quantum key distribution, the notary node is divided into transaction nodes and verification nodes, and the quantum key is divided into quantum keys for encryption, forming a notary waiting pool to improve transaction efficiency and Security.
It improves the efficiency and security of cross-chain transactions, can withstand quantum attacks, ensures the confidentiality and integrity of transaction data, and reduces the pressure and network delay impact of a single notary node.
Smart Images

Figure CN118917846A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of information security technology, and in particular to a notary cross-chain transaction method based on quantum key distribution. Background Art
[0002] Faced with the many types of blockchains available today, the problem of data silos has become particularly prominent. In order to solve the problem of data silos in blockchain transactions, a series of classic solutions have emerged. Among them, cross-chain technology based on the notary mechanism has a very wide range of application scenarios and has become a relatively mature solution in the cross-chain field. However, there are efficiency issues in using the existing notary method for cross-chain transactions. First, if the notary node is disconnected or fails due to network problems, the entire cross-chain transaction process will be suspended until the node is back online. Second, if the notary node has a slow processing speed or a high network delay, it may cause the transaction confirmation time to be extended, affecting the user experience and transaction efficiency.
[0003] With the rapid development of quantum technology, the security of traditional cryptography faces huge challenges. The emergence of quantum computers may pose a threat to the currently widely used classical cryptographic systems, especially the public key cryptographic system. The rapid development of quantum computing and quantum communication technology has brought new opportunities and challenges to the application of blockchain technology. The rise of quantum computers may pose a threat to traditional encryption algorithms and security mechanisms, which means that in the future, the traditional notary mechanism will face the risk of quantum attacks.
[0004] The quantum notary mechanism can provide a higher level of security. Due to the special properties of quantum computers, traditional encryption algorithms and signature mechanisms may be cracked and attacked. The notary mechanism based on quantum technology can take advantage of quantum computers, such as quantum key distribution and quantum signature, to enhance the security of the blockchain system. By using quantum technology, blockchain can be provided with stronger encryption protection and the ability to resist quantum attacks, ensuring the confidentiality and integrity of transactions and data. By combining quantum technology with blockchain cross-chain technology, the present invention can effectively solve the security problem of blockchain networks facing quantum technology attacks while overcoming the data island problem in blockchain transactions.
[0005] In summary, the traditional notary mechanism currently does not have the ability to resist quantum attacks, and there are no research results in the field of combining quantum technology with the notary mechanism. It is necessary to combine the notary mechanism with quantum technology to provide a notary cross-chain transaction mechanism that is convenient, easy to use, highly secure, and resistant to quantum attacks. Summary of the invention
[0006] In view of the efficiency problems existing in the traditional notary mechanism cross-chain model, the present invention proposes a notary cross-chain transaction method based on quantum key distribution. By dividing the traditional notaries into transaction nodes and verification nodes according to their responsibilities, the notaries jointly participate in cross-chain transactions, so as to disperse the processing flow of the notaries, reduce the pressure on the notary nodes and the dependence of cross-chain transaction affairs on a single notary node, and improve the efficiency of cross-chain transactions of the notary mechanism. At the same time, in view of the problem that the traditional notary mechanism cannot resist the threat of quantum attacks, the present invention combines quantum technology with notary technology, uses the quantum key distribution (Quantum Key Distribution, QKD) mechanism to generate quantum keys for cross-chain transactions, and uses quantum keys as Advanced Encryption Standard (Advanced Encryption Standard, AES) keys. Even if an adversary with quantum capabilities attacks, it is impossible to obtain the specific details of the message, so that the existing notary mechanism has the ability to resist the threat of quantum attacks, and improves the efficiency and security of transactions.
[0007] The technical solution of the present invention is introduced as follows.
[0008] A notary cross-chain transaction method based on quantum key distribution, which uses ordinary user nodes as transaction parties, notary nodes as supervisors of transaction parties, and verification nodes as asset verification parties and cross-chain transaction intermediaries; transaction nodes are used to perform quantum key distribution and share quantum keys with user nodes on chain a to perform transaction operations; transaction nodes and verification nodes jointly form a notary waiting pool; each time a cross-chain transaction is processed, a transaction node and a verification node form a notary group to process a single cross-chain transaction, and a single notary group processes a cross-chain transaction transaction;
[0009] The specific steps are as follows:
[0010] Step S1: Notary Public Preparatory Selection Stage
[0011] Use the Proof of Stake (POS) consensus mechanism to select nodes on the chain, generate a batch of notary nodes, and divide these notary nodes into transaction nodes and verification nodes according to their functions, and add them to the notary waiting pool to wait for cross-chain transaction transactions;
[0012] Step S2: Key distribution phase
[0013] The single notary group transaction node uses the quantum key distribution QKD method to generate a shared key and share it with the user node;
[0014] Step S3: Transaction Phase
[0015] User nodes on two chains (chain a and chain b) conduct cross-chain transactions. The user nodes on chain a first use the shared key to double-encrypt the transaction information using a double encryption method, and then send the encrypted transaction information to the single notary group transaction node. The single notary group transaction node executes the quantum information encryption and decryption rule QER to decrypt and obtain the transaction information, and then starts the transaction. The single notary group verification node transfers the money to complete the transaction.
[0016] In the present invention, step S1 includes the following steps:
[0017] Step S11: Select notary nodes on the chain through the POS consensus mechanism, sort the assets of the nodes on the chain from large to small, select a group of nodes on the chain with high asset weight rankings as notary nodes, and divide them into transaction nodes and verification nodes in a 1:1 ratio;
[0018] Step S12: Add the transaction nodes and verification nodes in step S11 to the notary waiting pool. The notary nodes in the pool are all used to process cross-chain transaction transactions. Each time, a transaction node and a verification node in the pool are selected to form a single notary group to process a cross-chain transaction request.
[0019] In the present invention, the notary waiting pool has the function of allocating a single notary group, and when a transaction node goes offline due to network delay, the verification node notifies the notary waiting pool, and the notary waiting pool reallocates the transaction node and is responsible for the current cross-chain transaction. By setting up a notary waiting pool, there will be a group of notary nodes with good network status waiting to process transactions at any time. Once the network of the notary node in the ongoing transaction fails, the notary node can be switched in a short time, thereby avoiding the transaction from being rolled back due to the notary node going offline, and improving the transaction success rate and the robustness to deal with bad networks.
[0020] In the present invention, step S2 includes the following operations:
[0021] The single notary group transaction node uses the quantum key distribution QKD method to generate a pair of shared keys K and share them with the user nodes on the a chain.
[0022] In the present invention, step S3 specifically comprises the following steps:
[0023] Step S31: The user node on chain a converts the transaction information into a binary sequence and prepares the plaintext quantum sequence M to be encrypted as follows:
[0024] M=011213…i n (i∈{0,1})
[0025] Wherein, M represents the prepared plaintext quantum sequence to be encrypted, and n represents the number of controllable particle bits; the steps for generating the plaintext quantum sequence M to be encrypted are as follows:
[0026] ① Encode the plaintext information to be transmitted into binary to obtain a binary sequence Mq;
[0027] ② The 0 in Mq corresponds to the quantum state |0>, and the 1 in the binary sequence corresponds to the quantum state |1>, converting Mq bit by bit;
[0028] ③Connect each converted bit together to form the plaintext quantum sequence M to be encrypted;
[0029] Step S32: After receiving the shared key K, the user node on chain a executes the quantum encryption and decryption rule QER to encrypt the information to be encrypted; the encryption method using the quantum encryption and decryption rule QER is as follows:
[0030] First, traverse each bit of the shared key K, and also traverse the plaintext quantum sequence M to be encrypted. If the current bit of K traversed is |0>, continue traversing. If the current bit of K traversed is |1>, use the quantum operation gate H to perform quantum gate transformation on the current bit of M, and replace the current bit of M with the transformed result. When the traversal is completed, the QER quantum encryption and decryption process ends, and the ciphertext S encrypted by the shared key is obtained.
[0031] Step S33: The user node on chain a uses the shared key K as the AES key to encrypt the ciphertext S to obtain the ciphertext S1.
[0032] Step S34: the user node on chain a sends the ciphertext S1 obtained by executing the double encryption method to the single notary group transaction node;
[0033] Step S35: The single notary group transaction node receives the ciphertext S1, uses the shared key K as the AES key to decrypt it, obtains the ciphertext S, and then uses the quantum encryption and decryption rule QER to decrypt the ciphertext S to obtain the transaction information content, which includes the transaction source address, destination address, amount and expected transaction time; wherein: the decryption method using the quantum encryption and decryption rule QER is as follows:
[0034] First, traverse each bit of the shared key K, and also traverse the ciphertext S to be decrypted. If the current bit of K traversed is |0>, continue traversing. If the current bit of K traversed is |1>, use the quantum operation gate H to perform quantum gate transformation on the current bit of S, and replace the current bit of S with the transformed result. When the traversal is completed, the QER quantum decryption process ends, and the plaintext decrypted by the shared key is obtained.
[0035] Step S36: A single notary group transaction node starts a transaction, records relevant transaction information and transaction time, and monitors the transaction status;
[0036] Step S37: The single notary group verification node has accounts on both chain a and chain b. After the transaction is opened, the user node on chain a transfers the transaction amount to the account of the single notary group verification node on chain a. At the same time, the single notary group verification node transfers funds of equal value from chain b to the user node on chain b to complete the transaction.
[0037] Compared with the prior art, the present invention has the following beneficial effects:
[0038] 1. In the traditional notary mechanism, a single notary is responsible for cross-chain transactions. Due to the unpredictability of network conditions, there is a delay in the communication between the transaction node and the notary. Once the notary node is disconnected for some reason, the transaction is interrupted and cannot continue. The present invention divides the notary nodes in the traditional notary mechanism into transaction nodes and verification nodes, which handle different cross-chain transaction matters respectively, reducing the work pressure of a single notary node, effectively solving the problem of delayed transactions caused by notary node failures, and improving the efficiency of cross-chain transactions.
[0039] 2. The present invention combines quantum technology with blockchain technology to enable notary nodes to have quantum capabilities. Quantum keys can be generated through the quantum key distribution mechanism and used as AES keys in blockchain cross-chain transactions. This design enables the entire transaction process to resist quantum attacks without significantly increasing the complexity of the transaction. In addition, the present invention designs QER quantum information encryption and decryption rules to encode the plaintext on the chain bit by bit, which greatly improves the security of information. Even if the message is leaked, valuable information will not be leaked. The data security during the transaction process is protected by the principles of quantum mechanics. If an eavesdropper attempts to crack the quantum key, it will cause the quantum state to collapse, which will be detected immediately and the key with the risk of leakage will be discarded. The attacker cannot obtain the quantum key. The whole method improves the security of cross-chain transactions while taking into account the ability to resist quantum attacks. BRIEF DESCRIPTION OF THE DRAWINGS
[0040] Figure 1 This is a flow chart of the notary cross-chain transaction method based on quantum key distribution. DETAILED DESCRIPTION
[0041] In order to facilitate the understanding of the present invention, the present invention will be described more fully below with reference to the relevant drawings. The present invention can be implemented in many different forms and is not limited to the embodiments described in the present invention. Unless otherwise defined, all technical and scientific terms used in the present invention have the same meaning as those commonly understood by those skilled in the art of the present invention. The terms used in the present invention in the specification of the present invention are only for the purpose of describing specific embodiments and are not intended to limit the present invention. The term "and / or" used in the present invention includes any and all combinations of one or more related listed items.
[0042] The notary cross-chain transaction method based on quantum key distribution of the present invention is as follows: Figure 1 As shown, the following steps are included:
[0043] A notary cross-chain transaction method based on quantum key distribution includes ordinary user nodes and notary nodes, wherein the notary nodes include transaction nodes and verification nodes. In the description of the present invention, the detailed definitions of ordinary user nodes and notary nodes are as follows:
[0044] Ordinary user nodes are used as transaction parties, hereinafter collectively referred to as user nodes;
[0045] Notary nodes, as supervisors of transaction parties, are collectively referred to as notary nodes below;
[0046] Validation nodes serve as asset verifiers and intermediaries for cross-chain transactions, hereinafter collectively referred to as validation nodes;
[0047] The transaction node is used to perform quantum key distribution and share quantum keys with user nodes on the a-chain to perform transaction operations, hereinafter collectively referred to as a transaction node;
[0048] All transaction nodes and verification nodes together form a notary waiting pool;
[0049] Each time a cross-chain transaction is processed, a notary group consisting of a transaction node and a verification node will process the single cross-chain transaction, hereinafter collectively referred to as a single notary group;
[0050] A single notary group processes a cross-chain transaction, where the verification nodes of the single notary group are collectively referred to as single notary group verification nodes; the transaction nodes of the single notary group are collectively referred to as single notary group transaction nodes.
[0051] The notary cross-chain transaction method based on quantum key distribution includes the following steps:
[0052] Step S1: In the notary preparation selection stage, the POS (Proof of steak) consensus mechanism is used to select nodes on the chain, generate a batch of notary nodes, and divide these notary nodes into transaction nodes and verification nodes according to their functions, and add them to the notary waiting pool to wait for the processing of cross-chain transaction affairs; the data structure of the notary waiting pool can be in the form of an asynchronous queue;
[0053] Step S2: In the key distribution phase, the single notary group transaction node simulates QKD (Quantum Key Distribution) through the open source quantum computing framework Qpanda-2 developed by Benyuan Quantum to generate a shared key and share it with the user node on the a chain;
[0054] Step S3: During the transaction phase, user nodes on two chains (chain a and chain b) conduct cross-chain transactions. The user nodes on chain a first use the shared key to double-encrypt the transaction information using a double encryption method, and then send the encrypted transaction information to the single notary group transaction node. The single notary group transaction node executes the quantum information encryption and decryption rule QER to decrypt and obtain the transaction information, and then starts the transaction. The single notary group verification node performs the transfer to complete the transaction.
[0055] The above step S1 specifically includes the following steps:
[0056] Step S11: Select notary nodes on the chain through the POS consensus mechanism, sort the assets of the on-chain nodes from large to small, select a group of on-chain nodes ranked in the top ten by asset weight as notary nodes, and divide them into five transaction nodes and five verification nodes in equal numbers.
[0057] Step S12: Set up a notary waiting pool in the form of an asynchronous queue and add the transaction node and verification node in step S11 to the notary waiting pool. All notary nodes in the pool can handle cross-chain transaction transactions. Each time, a transaction node and verification node in the pool are selected to form a single notary group to process a cross-chain transaction request.
[0058] In the above step S2, the transaction node generates a shared key, as follows:
[0059] The single notary group transaction node uses the quantum key distribution QKD method to generate a pair of shared keys K, which are shared with the user nodes on chain a; a variable is set in the user node data structure on chain a to save the shared key, and the value of the variable is initialized by the single notary group transaction node.
[0060] The above step S3 specifically includes the following steps:
[0061] Step S31: The user node on chain a converts the transaction information into a binary sequence in byte format, and prepares the plaintext quantum sequence M to be encrypted as follows:
[0062] M=011213…i n (i∈{0,1})
[0063] Wherein, M represents the prepared plaintext quantum sequence to be encrypted, and n represents the number of controllable particle bits. The steps for generating the plaintext quantum sequence M to be encrypted are as follows:
[0064] First, encode the plaintext information to be transmitted into binary to obtain a binary sequence Mq;
[0065] Then, 0 in Mq corresponds to the quantum state |0>, and 1 in the binary sequence corresponds to the quantum state |1>, and Mq is converted bit by bit;
[0066] Finally, each converted bit is spliced together to form the plaintext quantum sequence M to be encrypted.
[0067] Step S32: After receiving the shared key, the user node on chain a executes the QER quantum encryption and decryption rules to encrypt the information to be encrypted. The QER quantum encryption and decryption rules are as follows:
[0068] The input variables of the QER quantum encryption and decryption rule are the shared key K, the plaintext quantum sequence M to be encrypted, and the quantum operation gate H.
[0069] The specific methods of QER quantum encryption and decryption are as follows:
[0070] When encrypting, first traverse each bit of the shared key K, and also traverse the plaintext quantum sequence M to be encrypted. If the current bit of K traversed is |0>, continue traversing. If the current bit of K traversed is |1>, use the quantum operation gate H to perform a quantum gate transformation on the current bit of M, and replace the transformed result with the current bit of M. When the traversal is completed, the QER quantum encryption process ends, and the ciphertext S encrypted by the shared key is obtained.
[0071] When decrypting, first traverse each bit of the shared key K, and also traverse the ciphertext S to be decrypted. If the current bit of K traversed is |0>, continue traversing. If the current bit of K traversed is |1>, use the quantum operation gate H to perform a quantum gate transformation on the current bit of S, and replace the transformed result with the current bit of S. When the traversal is completed, the QER quantum decryption process ends, and the plaintext decrypted by the shared key is obtained.
[0072] The quantum gate transformation can be directly implemented using the built-in functions provided by Qpanda-2. After executing the function, the quantum sequence becomes the state after the gate operation.
[0073] Step S33: The user node on chain a uses the shared key K as the AES key to encrypt the ciphertext S to obtain the ciphertext S1.
[0074] Step S34: The user node on chain a sends the ciphertext S1 that has executed the double encryption method to the single notary group transaction node. The sending of the ciphertext can call the custom Transaction method in the chain code;
[0075] Step S35: The single notary group transaction node receives the ciphertext S1, uses the shared key K as the AES key to decrypt it, obtains the ciphertext S, and then uses the QER quantum encryption and decryption rules to decrypt the ciphertext S to obtain the transaction information content;
[0076] Step S36: A single notary group transaction node starts a transaction, records relevant transaction information and transaction time, and monitors the transaction status;
[0077] Step S37: The single notary group verification node has accounts on both chain a and chain b. After the transaction is opened, the user node on chain a transfers the transaction amount to the account of the single notary group verification node on chain a. At the same time, the single notary group verification node transfers funds of equal value from chain b to the user node on chain b to complete the transaction.
Claims
1. A notary cross-chain transaction method based on quantum key distribution, characterized in that: This method uses ordinary user nodes as transaction parties, notary nodes as transaction party supervisors, verification nodes as asset verification parties and intermediaries for cross-chain transactions. Transaction nodes are used to perform quantum key distribution and share keys with user nodes to perform transaction operations. Transaction nodes and verification nodes together form a notary waiting pool. Each time a cross-chain transaction is processed, a single notary group is formed by a transaction node and a verification node to process the single cross-chain transaction. A single notary group processes one cross-chain transaction. The specific steps are as follows: Step S1: Notary public preparatory selection stage Use the POS consensus mechanism to select nodes on the chain, generate a batch of notary nodes, and divide these notary nodes into transaction nodes and verification nodes according to their functions, and add them to the notary waiting pool to wait for cross-chain transaction transactions; Step S2: Key distribution phase The single notary group transaction node uses the quantum key distribution (QKD) method to generate a shared key and share it with the user node; Step S3: Transaction Phase User nodes on chain a and chain b conduct cross-chain transactions. The user nodes on chain a first use the shared key to double-encrypt the transaction information using a double encryption method, and then send the encrypted transaction information to the single notary group transaction node. The single notary group transaction node executes the quantum information encryption and decryption rule QER to decrypt and obtain the transaction information. Then the single notary group transaction node starts the transaction, and the single notary group verification node transfers the money to complete the transaction.
2. The notary cross-chain transaction method based on quantum key distribution according to claim 1 is characterized in that: Step S1 includes the following steps: Step S11: Select notary nodes on the chain through the POS consensus mechanism, sort the assets of the nodes on the chain from large to small, select a group of nodes on the chain with high asset weight rankings as notary nodes, and divide them into transaction nodes and verification nodes in a 1:1 ratio; Step S12: Add the transaction nodes and verification nodes in step S11 to the notary waiting pool. The notary nodes in the pool are all used to process cross-chain transaction transactions. Each time, a transaction node and a verification node in the pool are selected to form a single notary group to process a cross-chain transaction request.
3. The notary cross-chain transaction method based on quantum key distribution according to claim 1 is characterized in that: Step S2 includes the following operations: the single notary group transaction node uses the quantum key distribution QKD method to generate a pair of shared keys K to share with the user nodes on the a chain.
4. The notary cross-chain transaction method based on quantum key distribution according to claim 1 is characterized in that: Step S3 specifically includes the following steps: Step S31: The user node on chain a converts the transaction information into a binary sequence and prepares the plaintext quantum sequence M to be encrypted as follows: M=|0>1|1>2|1>3…|i> n (i∈{0,1}) Wherein, M represents the prepared plaintext quantum sequence to be encrypted, and n represents the number of controllable particle bits; the steps for generating the plaintext quantum sequence M to be encrypted are as follows: ① Encode the plaintext information to be transmitted into binary to obtain a binary sequence Mq; ② The 0 in Mq corresponds to the quantum state |0>, and the 1 in the binary sequence corresponds to the quantum state |1>, converting Mq bit by bit; ③Connect each converted bit together to form the plaintext quantum sequence M to be encrypted; Step S32: After receiving the shared key K, the user node on chain a executes the quantum encryption and decryption rule QER to encrypt the information to be encrypted; the encryption method using the quantum encryption and decryption rule QER is as follows: First, traverse each bit of the shared key K, and also traverse the plaintext quantum sequence M to be encrypted. If the current bit of K traversed is |0>, continue traversing. If the current bit of K traversed is |1>, use the quantum operation gate H to perform quantum gate transformation on the current bit of M, and replace the current bit of M with the transformed result. When the traversal is completed, the QER quantum encryption and decryption process ends, and the ciphertext S encrypted by the shared key K is obtained. Step S33: the user node on chain a uses the shared key K as the AES key to encrypt the ciphertext S to obtain the ciphertext S1; Step S34: the user node on chain a sends the ciphertext S1 obtained by executing the double encryption method to the single notary group transaction node; Step S35: The single notary group transaction node receives the ciphertext S1, uses the shared key K as the AES key to decrypt it, obtains the ciphertext S, and then uses the quantum encryption and decryption rule QER to decrypt the ciphertext S to obtain the transaction information content, which includes the transaction source address, destination address, amount and expected transaction time; the decryption method using the quantum encryption and decryption rule QER is as follows: First, traverse each bit of the shared key K, and also traverse the ciphertext S to be decrypted. If the current bit of K traversed is |0>, continue traversing. If the current bit of K traversed is |1>, use the quantum operation gate H to perform quantum gate transformation on the current bit of S, and replace the current bit of S with the transformed result. When the traversal is completed, the QER quantum decryption process ends, and the plaintext decrypted by the shared key is obtained. Step S36: A single notary group transaction node starts a transaction, records relevant transaction information and transaction time, and monitors the transaction status; Step S37: The single notary group verification node has accounts on both chain a and chain b. After the transaction is opened, the user node on chain a transfers the transaction amount to the account of the single notary group verification node on chain a. At the same time, the single notary group verification node transfers funds of equal value from chain b to the user node on chain b to complete the transaction.
