Key generation method and device, network equipment, server and storage medium

By using blockchain smart contracts to generate keys in ubiquitous networks, the problem of resource-constrained devices prone to leakage during key negotiation is solved, and higher communication security is achieved.

CN119814285APending Publication Date: 2025-04-11DATANG MOBILE COMM EQUIP CO LTD
View PDF 1 Cites 0 Cited by

Patent Information

Application Number
CN202311298352.5
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2023-10-09
Publication Date
2025-04-11

AI Technical Summary

Technical Problem

Resource-constrained devices in the ubiquitous network are prone to key leakage during key negotiation, resulting in the inability to guarantee the security of communication connections.

Method used

The information reconciliation results are obtained from the blockchain through the smart contract of the blockchain, and the communication key of the device is generated based on the information reconciliation results and the phase quantization information of the communication channel, ensuring the security and credibility of the key generation process.

Benefits of technology

It effectively prevents information leakage during key negotiation, improves communication security between ubiquitous IoT devices, so that devices will not leak information due to negotiation keys without establishing secure and trustworthy communication.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119814285A_ABST
    Figure CN119814285A_ABST
Patent Text Reader

Abstract

The invention relates to a key generation method and device, network equipment, a server and a storage medium, and the method comprises the steps that first equipment obtains an information reconciliation result from a block chain through an intelligent contract, and then generates a communication key of the first equipment according to the information reconciliation result and first phase quantization information of a communication channel; the information reconciliation result is a result obtained by reconciliating a bit difference caused by a communication channel between the first device and the second device by the accounting node of the block chain. According to the method, information leakage caused by key negotiation can be avoided under the condition that safe and credible communication is not established for two pieces of equipment which communicate with each other.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of communication technology, and in particular to a key generation method, device, network equipment, server and storage medium. Background Art

[0002] Ubiquitous network can be understood as a network formed by a large number of network devices that is not limited to the deployment location, deployment time and deployment object. For example, ubiquitous wireless sensor network, ubiquitous Internet of Things network, etc.

[0003] In the related technology, there are some network devices in the ubiquitous network. Because their own computing and storage capabilities and other resources are very limited, these resource-limited devices usually use methods such as configuring access addresses, plain text or transparent transmission to generate or negotiate keys to establish communication connections when communicating.

[0004] However, in the related art, key leakage is prone to occur during the key negotiation process between ubiquitous network devices. Summary of the invention

[0005] Based on this, it is necessary to provide a key generation method, device, network equipment, server and storage medium to address the above technical problems, and use the smart contract of blockchain to generate keys for communication between devices, so that two ubiquitous Internet of Things devices will not leak information due to negotiated keys when secure and reliable communication has not been established.

[0006] In a first aspect, an embodiment of the present application provides a key generation method, which is applied to a first device, and the method includes:

[0007] Obtaining an information reconciliation result from the blockchain through a smart contract; the information reconciliation result is a result of the blockchain's accounting node reconciling a bit difference caused by a communication channel between the first device and the second device;

[0008] A communication key of the first device is generated according to the information reconciliation result and the first phase quantization information of the communication channel.

[0009] In one embodiment, obtaining information reconciliation results from the blockchain through a smart contract includes:

[0010] By calling the retrieval function of the smart contract, the information reconciliation results are obtained from the blockchain.

[0011] In one embodiment, the information reconciliation result is obtained from the blockchain by calling the retrieval function of the smart contract, including:

[0012] Input the search information into the search function to generate the search command of the smart contract;

[0013] Obtaining a transaction identifier corresponding to the retrieval information from the blockchain by executing a retrieval command of the smart contract; the retrieval information includes a public key of the first device;

[0014] Obtain information reconciliation results based on the transaction information corresponding to the transaction identifier.

[0015] In one embodiment, the transaction information is generated by the accounting node according to the information reconciliation result, the public key of the first device and the public key of the second device, and is published on the blockchain by calling the publishing function of the smart contract.

[0016] In one embodiment, the accounting node associates the public key of the first device, the public key of the second device and the transaction identifier by calling a marking function of the smart contract.

[0017] In one embodiment, the accounting node is determined by the creator of the smart contract by inputting its own address into the deployment function of the smart contract.

[0018] In one of the embodiments, the above-mentioned information reconciliation result is obtained by the accounting node performing information reconciliation operation on the first phase quantization information and the second phase quantization information when the bits between the first phase quantization information and the second phase quantization information meet a preset condition; the first phase quantization information is generated by the first device based on the physical characteristics of the communication channel, and the second phase quantization information is generated by the second device based on the physical characteristics of the communication channel.

[0019] In one embodiment, the preset condition includes that the number of consistent bits between the first phase quantization information and the second phase quantization information is greater than a preset threshold.

[0020] In one embodiment, the method further comprises:

[0021] generating a first channel sounding signal according to a first channel sounding sequence sent by the second device; the first channel sounding signal represents a signal reflecting the physical characteristics of the communication channel;

[0022] Calculating first channel response phase information corresponding to the first device according to the first channel detection signal;

[0023] The first channel response phase information is quantized to obtain first phase quantization information.

[0024] In one embodiment, the method further comprises:

[0025] A second channel detection sequence is sent to the second device, where the second channel detection sequence is used to instruct the second device to generate a second channel detection signal, and second channel response phase information corresponding to the second device is calculated according to the second channel detection signal to quantize the second channel response phase information to obtain second phase quantization information.

[0026] In one embodiment, the method further comprises:

[0027] generating a first information data packet of a first device based on the first phase quantization information;

[0028] A first information data packet is sent to the accounting node to instruct the accounting node to generate an information reconciliation result according to the first information data packet and a second information data packet of the second device; the second information data packet is generated by the second device based on the second phase quantization information.

[0029] In one embodiment, the generating of the first information data packet of the first device based on the first phase quantization information includes:

[0030] Encrypt the first phase quantization information according to the public key of the accounting node to obtain first encrypted phase quantization information;

[0031] The first encrypted phase quantization information and the electronic certificate of the first device are packaged to obtain a first information data packet; the electronic certificate is obtained by the first device registering in a trusted institution of the blockchain.

[0032] In one embodiment, the method further comprises:

[0033] In response to a communication demand with the second device, performing two-way authentication with the second device;

[0034] When the two-way authentication is passed, it is determined that the communication channel is legally established.

[0035] In one embodiment, the performing two-way authentication with the second device includes:

[0036] Sending a first communication request to the second device, where the first communication request carries the electronic certificate and electronic signature of the first device;

[0037] receiving a second communication request returned by the second device, where the second communication request is sent when the second device determines that the electronic certificate and the electronic signature of the first device are both verified, and the second communication request carries the electronic certificate and the electronic signature of the second device;

[0038] When both the electronic certificate and the electronic signature of the second device pass the verification, it is determined that the two-way authentication is passed.

[0039] In one embodiment, the generating of the communication key of the first device according to the information reconciliation result and the first phase quantization information of the communication channel includes:

[0040] The first phase quantization information is subjected to difference bit adjustment according to the information reconciliation result to obtain a communication key of the first device.

[0041] In one embodiment, the method further comprises:

[0042] Encrypting the information to be transmitted according to the communication key to obtain encrypted transmission information;

[0043] Sending the encrypted transmission information to the second device to instruct the second device to decrypt the encrypted transmission information using the communication key of the second device;

[0044] When the decryption by the second device is successful, it is determined to establish a secure encrypted communication connection with the second device.

[0045] In a second aspect, an embodiment of the present application provides a key generation method, which is applied to an accounting node, and the method includes:

[0046] reconciling a bit difference caused by a communication channel between the first device and the second device to obtain an information reconciliation result;

[0047] The information reconciliation result is published on the blockchain through a smart contract; the information reconciliation result is used to generate a communication key of the first device from the first phase quantization information of the first device and the communication channel, and to generate a communication key of the second device from the second phase quantization information of the second device and the communication channel.

[0048] In one embodiment, publishing the information reconciliation result on the blockchain through a smart contract includes:

[0049] The information reconciliation results are published on the blockchain by calling the publishing function of the smart contract.

[0050] In one embodiment, the above-mentioned publishing of the information reconciliation result on the blockchain by calling the publishing function of the smart contract includes:

[0051] Generate transaction information according to the information reconciliation result, the public key of the first device and the public key of the second device;

[0052] Input the transaction information into the publishing function to generate the publishing command of the smart contract;

[0053] By executing the publishing command of the smart contract, the transaction information is published on the blockchain.

[0054] In one embodiment, the method further comprises:

[0055] Generate a transaction identifier for transaction information;

[0056] By calling the marking function of the smart contract, the public key of the first device, the public key of the second device and the transaction identifier are associated.

[0057] In one embodiment, before publishing the information reconciliation result on the blockchain through the smart contract, the method further includes:

[0058] Input the address of the accounting node into the deployment function of the smart contract to determine that the accounting node is the creator of the smart contract.

[0059] In one embodiment, the bit difference caused by the communication channel between the first device and the second device is reconciled to obtain the information reconciliation result, including:

[0060] Acquire first phase quantization information and second phase quantization information; the first phase quantization information is generated by the first device based on the physical characteristics of the communication channel, and the second phase quantization information is generated by the second device based on the physical characteristics of the communication channel;

[0061] comparing a bit difference between the first phase quantization information and the second phase quantization information;

[0062] When the bit between the first phase quantization information and the second phase quantization information meets a preset condition, an information reconciliation operation is performed on the first phase quantization information and the second phase quantization information to obtain an information reconciliation result.

[0063] In one embodiment, the preset condition includes that the number of consistent bits between the first phase quantization information and the second phase quantization information is greater than a preset threshold.

[0064] In one embodiment, the obtaining of the first phase quantization information and the second phase quantization information includes:

[0065] receiving a first information data packet sent by a first device and a second information data packet sent by a second device;

[0066] The first information data packet includes first phase quantization information and an electronic certificate of the first device; the second information data packet includes second phase quantization information and an electronic certificate of the second device.

[0067] In one embodiment, before comparing the bit difference between the first phase quantization information and the second phase quantization information, the method further includes:

[0068] Verifying the electronic certificate of the first device and the electronic certificate of the second device;

[0069] When both the electronic certificate of the first device and the electronic certificate of the second device are verified, the step of performing information reconciliation operation is performed.

[0070] In one embodiment, the verifying the electronic certificate of the first device and the electronic certificate of the second device includes:

[0071] In the certificate revocation list provided by the trusted authority of the blockchain, query the electronic certificate of the first device and the electronic certificate of the second device;

[0072] If the electronic certificate of the first device exists in the certificate revocation list, determining that the electronic certificate of the first device has passed verification;

[0073] In a case where the electronic certificate of the second device exists in the certificate revocation list, it is determined that the electronic certificate of the second device passes verification.

[0074] In a third aspect, an embodiment of the present application provides a key generation device, the device comprising:

[0075] An acquisition module, used to obtain an information reconciliation result from the blockchain through a smart contract; the information reconciliation result is a result of the accounting node of the blockchain reconciling the bit difference caused by the communication channel between the first device and the second device;

[0076] The generating module is used to generate a communication key of the first device according to the information reconciliation result and the first phase quantization information of the communication channel.

[0077] In a fourth aspect, an embodiment of the present application provides a key generation device, the device comprising:

[0078] A reconciliation module, used to reconcile the bit difference caused by the communication channel between the first device and the second device to obtain an information reconciliation result;

[0079] A publishing module is used to publish information reconciliation results on the blockchain through a smart contract; the information reconciliation results are used to generate a communication key of the first device based on the first phase quantization information of the first device and the communication channel, and to generate a communication key of the second device based on the second phase quantization information of the second device and the communication channel.

[0080] In a fifth aspect, an embodiment of the present application provides a network device, the network device includes a memory and a processor, the memory stores a computer program, and the processor implements the steps of the method provided in any embodiment of the first aspect when executing the computer program.

[0081] In a sixth aspect, an embodiment of the present application provides a server, the server comprising a memory and a processor, the memory storing a computer program, and the processor implementing the steps of the method provided in any one of the embodiments of the second aspect when executing the computer program.

[0082] In the seventh aspect, an embodiment of the present application provides a processor-readable storage medium, which stores a program for causing the processor to execute the steps of the method provided in any embodiment of the first aspect or any embodiment of the second aspect.

[0083] The key generation method, device, network device, server and storage medium provided by the embodiment of the present application, the first device obtains the information reconciliation result from the blockchain through a smart contract, and then generates the communication key of the first device according to the information reconciliation result and the first phase quantization information of the communication channel; the information reconciliation result is the result of the blockchain's accounting node reconciling the bit difference caused by the communication channel between the first device and the second device. In this method, the first device can view the information reconciliation result on the blockchain through a smart contract. Because the blockchain has the characteristics of being unchangeable, open and transparent, the credibility of the information reconciliation result can be greatly increased, and the credibility of the communication key generated by the first device is improved, so that the two ubiquitous Internet of Things devices will not leak information due to the negotiation of the key when a secure and reliable communication is not established. In addition, the information reconciliation result is the result of reconciling the bit difference caused by the communication channel between the first device and the second device, and the first phase quantization information refers to the phase quantization information of the communication channel. In this way, the first device generates a communication key using the information reconciliation result and the first phase quantization information, which is equivalent to extracting information from the communication channel of the physical layer to generate a key based on the physical layer security of the communication channel, which greatly increases the security of the generated key. BRIEF DESCRIPTION OF THE DRAWINGS

[0084] Figure 1 A schematic diagram of a key generation environment architecture in an embodiment;

[0085] Figure 2 A schematic diagram of a key generation method flow in an embodiment;

[0086] Figure 3 is a schematic flow chart of a key generation method in another embodiment;

[0087] Figure 4 is a schematic flow chart of a key generation method in another embodiment;

[0088] Figure 5 is a schematic flow chart of a key generation method in another embodiment;

[0089] Figure 6 is a schematic flow chart of a key generation method in another embodiment;

[0090] Figure 7 is a schematic flow chart of a key generation method in another embodiment;

[0091] Figure 8 is a schematic flow chart of a key generation method in another embodiment;

[0092] Fig. 9 is a schematic flow chart of a key generation method in another embodiment;

[0093] Fig.10 is a schematic flow chart of a key generation method in another embodiment;

[0094] Fig.11 is a schematic flow chart of a key generation method in another embodiment;

[0095] Fig.12 Schematic diagram of the structure of a key generating device in an embodiment;

[0096] Fig.13 is a schematic structural diagram of a key generating device in another embodiment;

[0097] Fig.14 The figure is a schematic diagram of the network device structure in an embodiment. DETAILED DESCRIPTION

[0098] In order to make the purpose, technical solution and advantages of the present application more clearly understood, the present application is further described in detail below in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the present application and are not used to limit the present application.

[0099] In the embodiments of the present invention, the term "and / or" describes the association relationship of associated objects, indicating that three relationships may exist. For example, A and / or B may represent three situations: A exists alone, A and B exist at the same time, and B exists alone. The character " / " generally indicates that the associated objects before and after are in an "or" relationship.

[0100] In the embodiments of the present application, the term "plurality" refers to two or more than two, and other quantifiers are similar.

[0101] The following will be combined with the drawings in the embodiments of the present application to clearly and completely describe the technical solutions in the embodiments of the present application. Obviously, the described embodiments are only part of the embodiments of the present application, not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of this application.

[0102] In the mobile communication network of the post-5G era, the computing and storage capabilities of some devices in the ubiquitous network are very limited or lack key management facilities. Taking ubiquitous IoT devices as an example, in related technologies, most ubiquitous IoT devices still use the configuration access address, plain text, and transparent access methods to access the management platform, which makes the risk of key leakage during key negotiation during the communication process, and cannot guarantee the security of the communication connection between the two devices.

[0103] Based on this, an embodiment of the present application provides a key generation method, which combines the characteristics of the blockchain network and the physical characteristics of the physical layer communication channel, and uses the blockchain's smart contract to generate keys for ubiquitous Internet of Things devices to communicate, so that two ubiquitous Internet of Things devices will not have information leakage due to negotiated keys when there is no secure and trusted communication established.

[0104] The following describes an environment architecture in which the key generation method in the embodiments of the present application can be applied.

[0105] like Figure 1 As shown, a schematic diagram of a key generation environment architecture is provided. The elements in the key generation environment architecture include a blockchain platform 01, an accounting node 02, a first device 03, a second device 04, a trusted institution of the blockchain 05, and other accounting nodes 06. Among them, the blockchain platform 01 is deployed on a computer device, and each element is independent of each other.

[0106] The blockchain platform 01 refers to a blockchain network platform that provides accounting nodes 02 and ubiquitous network devices (first device 03, second device 04) to participate, and is a distributed decentralized electronic ledger. The trusted institution 05 has the ability to initialize blockchain system parameters, register blockchain network nodes, and publish key information and electronic certificates of each device, but the trusted institution 05 is not directly connected to the blockchain network.

[0107] The accounting node 02 and other accounting nodes 06 are the main nodes in the blockchain, and they can be any server, which is used to provide computing power, operation and maintenance, and publish accounting information for the blockchain. Among them, other accounting nodes 06 generally refer to at least one accounting node other than accounting node 02, so that the accounting node 02 and other accounting nodes 06 constitute multiple accounting nodes to jointly maintain the operation of the blockchain network.

[0108] The accounting node 02 can communicate with the first device 03 and the second device 04 at the same time, and is used to provide authentication and information reconciliation functions for the first device 03 and the second device 04 during communication.

[0109] The first device 03 and the second device 04 refer to any two terminal devices with communication needs in the ubiquitous network. Both are devices within the management scope of the accounting node 02. For example, the first device 03 can be any resource-constrained ubiquitous network device in the ubiquitous network, and the second device 04 can be another resource-constrained ubiquitous network device in the ubiquitous network that has a communication need with the first device 03. Among them, the ubiquitous network can be a ubiquitous wireless sensor network, a ubiquitous Internet of Things, etc. The ubiquitous Internet of Things includes but is not limited to the Internet of Things composed of smart home devices, the Internet of Things composed of smart city devices, the Internet of Things composed of various devices in industry, and the like.

[0110] In some cases, considering that resource-constrained ubiquitous network devices are resource-constrained, their computing and storage capabilities are very limited, and the blockchain network requires each node to consume a lot of computing power to maintain, so for resource-constrained ubiquitous network devices, they cannot become blockchain nodes to participate in the blockchain network. Of course, for non-resource-constrained ubiquitous network devices, they can participate in the operation and maintenance of the blockchain as blockchain nodes, and this embodiment of the application will not elaborate on this situation.

[0111] For example, the first device 03 and the second device 04 are resource-constrained ubiquitous network devices. Figure 1 In the environment architecture, the first device 03 and the second device 04 have communication capabilities, and both the first device 03 and the second device 04 have communication capabilities with the accounting node 02 and the blockchain platform 01. However, the first device 03 and the second device 04 do not participate in the operation and maintenance of the blockchain, and can only trigger the smart contract in the blockchain to retrieve transaction information from the blockchain.

[0112] Among them, a smart contract is a programmable application that runs on a blockchain. It can be a computerized transaction protocol that executes the terms of a contract, a program that sets rules in advance, and when specific conditions are met, the smart contract will follow the established rules to perform corresponding actions. Therefore, the smart contract in the embodiment of the present application is based on the actual needs of solving technical problems in the embodiment of the present application, and custom programming enables it to have custom functions. In the description process of the following embodiments, the various functions of the smart contract will be described one by one in combination with the content of the embodiment, and will not be repeated here.

[0113] Among them, the smart contract in the embodiment of the present application can be a smart contract supported on platforms such as Ethereum and Hyperledger.

[0114] In an embodiment of the present application, when a first device needs to communicate with a second device, the first device needs to generate a key for communicating with the second device. At the same time, the second device also needs to generate a key for communicating with the first device. Then, the first device and the second device establish a secure and reliable communication channel between the two parties through their respective keys.

[0115] Since the first device and the second device both refer to any two devices that need to communicate, the method of generating a key for communicating with each other is the same for both the first device and the second device. That is, the embodiment of the present application takes the first device as the execution subject and describes the process of the first device generating a key for communicating with the second device, but the entire method is also applicable to the process of the second device generating a key for communicating with the first device.

[0116] The following is combined with the above Figure 1 An embodiment of a key generation method with a first device as the execution subject is described based on an environment architecture.

[0117] In one embodiment, Figure 2 As shown, an embodiment of the present application provides a key generation method, which may include the following steps:

[0118] S101, obtaining an information reconciliation result from the blockchain through a smart contract; the information reconciliation result is a result of the blockchain's accounting node reconciling the bit difference caused by the communication channel between the first device and the second device.

[0119] As can be seen from the above description, in the embodiment of the present application, the first device has the function of triggering the smart contract in the blockchain to retrieve transaction information from the blockchain, so the first device can obtain the information reconciliation result from the blockchain through the smart contract. The information reconciliation result is obtained by the transaction information retrieved from the blockchain.

[0120] In the embodiment of the present application, the information reconciliation result refers to the result of the accounting node reconciling the bit difference caused by the communication channel between the first device and the second device.

[0121] Among them, the communication channel between the first device and the second device can be understood as a physical layer communication channel established between the first device and the second device when the two devices communicate. The bit difference refers to the inconsistent bits between the data signal received by the first device based on the communication channel and the data signal received by the second device based on the communication channel. For example, the data signal reflecting the communication channel can be the phase information of the communication channel, or the phase quantization information of the communication channel, etc. The specific content referred to by the bit data in the embodiment of the present application is not limited.

[0122] The reason for the bit difference is that the communication channel between the first device and the second device has imperfect random physical characteristics, namely noise, fading, and interference. These imperfect random physical characteristics will cause the correctness of the data signal received by the first device from the communication channel and the data signal received by the second device from the communication channel when the first device communicates with the second device, that is, the bits of the data signal received by the communicating parties on the physical channel are not completely consistent. Therefore, the data signal of the physical channel received in the embodiment of the present application can be understood as a channel coding that reflects the physical characteristics of the communication channel. The channel coding generated in combination with these random physical characteristics on the communication channel can enable the communicating parties to communicate securely, which not only ensures information security and prevents effective information from being eavesdropped, but also can perform channel information error correction.

[0123] Based on this, the information reconciliation result can be understood as the result of the accounting node correcting the data signal bit difference between the first device and the second device. The information reconciliation result can be embodied in the form of text, characters, or a combination of text and characters. The character form is not limited to letters, numbers, and calculation methods.

[0124] Among them, the way for the first device to obtain the information reconciliation result from the blockchain through the smart contract can be to initiate a command to retrieve transaction information to the smart contract, and obtain the corresponding transaction information by executing the command, thereby obtaining the information reconciliation result.

[0125] S102, generating a communication key of the first device according to the information reconciliation result and the first phase quantization information of the communication channel.

[0126] Based on the information reconciliation result acquired by the first device, the first device generates a communication key of the first device according to the information reconciliation result and the first phase quantization information of the communication channel.

[0127] The first phase quantization information of the communication channel refers to quantization information of the channel response phase, which is generated by the first device based on the data signal received from the communication channel.

[0128] The communication key of the first device refers to the key that the first device needs to use when communicating with the second device. Naturally, the key that the second device needs to use when communicating with the first device is called the communication key of the second device.

[0129] For example, the first device may generate the communication key of the first device by inputting the information reconciliation result and the first phase quantization information into a pre-trained neural network model, the neural network model is trained based on a large amount of sample phase quantization information and sample information reconciliation results, and is a model specifically used to calculate the information reconciliation result and the phase quantization information to obtain the communication key. Therefore, the result output by the neural network model is the communication key of the first device.

[0130] As another example, assuming that the information reconciliation result is in the form of characters + text, and the content indicated is a certain operation based on some data provided, then the way for the first device to generate the communication key of the first device can be to operate on the first phase quantization information according to the data and operation indicated in the information reconciliation result, and the result obtained is the communication key of the first device.

[0131] In the embodiment of the present application, the first device obtains the information reconciliation result from the blockchain through a smart contract, and then generates the communication key of the first device according to the information reconciliation result and the first phase quantization information of the communication channel; the information reconciliation result is the result of the blockchain's accounting node reconciling the bit difference caused by the communication channel between the first device and the second device. In this method, the first device can view the information reconciliation result on the blockchain through a smart contract. Because the blockchain has the characteristics of being unchangeable, open and transparent, the credibility of the information reconciliation result can be greatly increased, and the credibility of the communication key generated by the first device is improved, so that the two ubiquitous Internet of Things devices will not leak information due to the negotiation of the key when a secure and reliable communication is not established. In addition, the information reconciliation result is the result of reconciling the bit difference caused by the communication channel between the first device and the second device, and the first phase quantization information refers to the phase quantization information of the communication channel. In this way, the first device generates a communication key using the information reconciliation result and the first phase quantization information, which is equivalent to extracting information from the communication channel of the physical layer to generate a key based on the physical layer security of the communication channel, which greatly increases the security of the generated key.

[0132] Moreover, when the first device is a resource-constrained device, since it does not have the computing and storage capabilities required by the blockchain node, it cannot normally participate in the operation and maintenance of the blockchain as a blockchain node, and can only trigger the smart contract in the blockchain to retrieve information from the blockchain. In this regard, the embodiment of the present application combines the programmable functions of the smart contract and adds smart contract program commands, so that the resource-constrained device can still call the information published on the blockchain through the program commands of the smart contract when it cannot be used as a blockchain node and cannot fully store the blockchain distributed ledger. Thereby, the resource-constrained first device can safely generate the communication key required to communicate with the second device, further ensuring the security of key generation.

[0133] In practical applications, combined with the programmable functions of smart contracts, adding smart contract program commands can be adding corresponding functional functions in the smart contract. Based on this, in one embodiment, the process of obtaining information reconciliation results from the blockchain through the smart contract in S101 includes: obtaining information reconciliation results from the blockchain by calling the retrieval function of the smart contract.

[0134] The retrieval function may be a "Get" function defined in the smart contract, which is set to be callable by any device and is mainly used to retrieve published transaction information on the blockchain network. In this way, when the first device needs to generate a communication key for communicating with the second device, it needs to first obtain the corresponding information reconciliation result from the blockchain, and the first device may use the retrieval function to execute the "Get" command to obtain the required information reconciliation result.

[0135] In the embodiment of the present application, by utilizing the programmable function of the smart contract in the blockchain, a retrieval function is added to the smart contract, so that the first device can retrieve information from the blockchain by calling the retrieval function, thereby obtaining the information reconciliation result. That is, in this case, even if the first device cannot participate in the complete storage of the blockchain distributed ledger as a node of the blockchain due to resource constraints, the information reconciliation result can be obtained through the retrieval function, which greatly increases the reliability of the first device to securely obtain the information reconciliation result from the blockchain.

[0136] Furthermore, the premise for obtaining the information reconciliation result from the blockchain is that the information reconciliation result has been published in the blockchain. The following describes the process of publishing the information reconciliation result in the blockchain through some embodiments.

[0137] As mentioned above, both the first device and the second device are within the management scope of the accounting node, and the accounting node is the main node in the blockchain. Therefore, in the embodiment of the present application, the information reconciliation result is entered into the smart contract of the blockchain through the accounting node to realize the release of the information reconciliation result.

[0138] Specifically, in addition to the above-mentioned search function added to the smart contract, it is also necessary to use the programmable function of the smart contract in advance to add deployment function, release function and marking function to the smart contract. Among them:

[0139] The deployment function can be a function called "Deployer" defined in the smart contract. The Deployer can only be called by the creator. Its function is to clearly create the accounting node address of the smart contract, including: defining the creator as the accounting node address, verifying whether the calling user is the creator of the smart contract, etc.

[0140] The release function can be a function function of "PulishSeq" defined in the smart contract. The PulishSeq can only be called by the creator. Its function is to be used by the smart contract creator to publish the information reconciliation result and the corresponding public key information and transaction identifier of both parties' devices, that is, to generate a transaction information including the transaction identifier, information reconciliation result and the corresponding public key information of both parties' devices.

[0141] The marking function can be a function function of "Update" defined in the smart contract. The Update can only be called by the creator. Its function is to be used by the smart contract creator to mark the corresponding transaction identifier and the public key information of the devices of both parties.

[0142] Based on the three functions of the smart contract, the accounting node must first become the creator of the smart contract before it can execute the above three functions. Then, in one embodiment, the accounting node determines the creator of the smart contract by inputting its own address into the deployment function of the smart contract.

[0143] Assuming that the deployment function is recorded as function Deployer(), the accounting node takes its own address as input and calls function Deployer() to form function Deployer (the address of the accounting node). After the function Deployer (the address of the accounting node) is executed, the accounting node can be clearly defined as the creator of the smart contract. In this way, the accounting node can realize the definition of the creator of the smart contract by inputting its own address into the deployment function, which improves the convenience of the accounting node in publishing information and reconciliation results.

[0144] After the accounting node becomes the creator of the smart contract, the accounting node needs to publish the information reconciliation result obtained by calculation in the blockchain. In one embodiment, the transaction information is generated by the accounting node according to the information reconciliation result, the public key of the first device and the public key of the second device, and is published on the blockchain by calling the publishing function of the smart contract.

[0145] The accounting node publishes the information reconciliation result by first generating a transaction information with the information reconciliation result, the public key of the first device and the public key of the second device, and then publishes the transaction information on the blockchain by calling the publishing function of the smart contract.

[0146] Assume that the publishing function is recorded as function PublishSeq(), and the information reconciliation result is recorded as Seq 1-2 , the public key of the first device is recorded as pk1, and the public key of the second device is recorded as pk2, then the accounting node will Seq 1-2 , pk1 and pk2 are input into function PublishSeq() to form function PublishSeq(Seq 1-2 , pk1, pk2), and then execute functionPublishSeq(Seq 1-2 , pk1, pk2) can generate transaction information.

[0147] The accounting node generates a corresponding transaction identifier based on the transaction information, recorded as TxID. At this point, the accounting node publishes the transaction identifier TxID, the information reconciliation result Seq in the blockchain. 1-2 , and the public key pk1 of the first device and the public key pk2 of the second device.

[0148] In the embodiment of the present application, the accounting node generates a transaction information with the information reconciliation result and the public key of the first device and the public key of the second device, and generates a corresponding transaction identifier for the transaction information, so that the information reconciliation result is published by publishing the transaction information. In this way, the communication smart contract publishes the information reconciliation result, and uses the unchangeable, open and transparent characteristics of the blockchain to ensure the credibility of the accounting node as a third party and the security of the information reconciliation result published on the blockchain. In addition, when publishing the information reconciliation result, the public key of the first device and the public key of the second device are published together as a transaction information, which is equivalent to establishing an association relationship between the information reconciliation result and the public key of the first device and the public key of the second device respectively. In this way, after the first device locates the transaction information with its own public key, it can obtain the information reconciliation result in the transaction information, which improves the speed and accuracy of the information reconciliation result retrieval.

[0149] In addition, after the above transaction information is generated, a transaction identifier corresponding to the transaction information is also generated. In some scenarios, the corresponding transaction information can also be located by retrieving the transaction identifier to obtain the information reconciliation result. The present application also provides an embodiment in which the accounting node associates the public key of the first device, the public key of the second device, and the transaction identifier by calling the marking function of the smart contract.

[0150] Assuming that the marking function is recorded as function Update(), the accounting node will input the transaction identifier TxID, the public key pk1 of the first device and the public key pk2 of the second device into function Update() to form function Update(TxID, pk1, pk2), and then execute function Update(TxID, pk1, pk2) to map pk1 and pk2 to the transaction identifier TxID, thereby establishing a mapping relationship between the public key of the first device and the transaction identifier, and a mapping relationship between the public key of the second device and the transaction identifier.

[0151] In the embodiment of the present application, by pre-binding the transaction identifier with the public key of the first device and the public key of the second device respectively, a mapping relationship between the transaction identifier and the public keys of the two devices is established, so that the transaction identifier can be first retrieved through the public key of the device, and then the corresponding transaction information can be located through the transaction identifier, thereby obtaining the required information reconciliation result, enriching the information reconciliation result retrieval method and making the information reconciliation result retrieval method more flexible.

[0152] Based on the transaction information published on the blockchain by the above-mentioned accounting nodes through smart contracts, such as Figure 3 As shown, in one embodiment, there is provided an implementation method in which a first device obtains information reconciliation results from a blockchain by calling a retrieval function of a smart contract, and the embodiment includes the following steps:

[0153] S201, input the retrieval information into the retrieval function to generate a retrieval command for the smart contract; the retrieval information includes the public key of the first device.

[0154] In some cases, the calling of the function in the smart contract needs to be carried out by inputting the search information. Therefore, when the first device calls the above search function, it can first obtain the search information, and then input the search information into the above search function to generate the search command of the smart contract. Specifically, when the first device needs to call the search function, it sends the search information to the smart contract. After receiving the search information, the smart contract determines that it needs to call the search function, and then generates a call instruction pointing to the search function.

[0155] In actual applications, the first device can know in advance the calling method of the function in the smart contract that it can call, that is, the first device can know in advance the retrieval information content of calling the retrieval function.

[0156] For example, in an embodiment of the present application, the retrieval information includes the public key of the first device, which can be applied by the first device at a trusted institution of the blockchain. Whether it is the first device, the second device or the accounting node, before accessing the blockchain for the first time, it is necessary to register information from a trusted institution to obtain its own public key. For example, the public key of the first device can be recorded as pk1.

[0157] Here, combined with the above Figure 1 , a process of registering the accounting node, the first device, and the second device in a trusted institution of the blockchain is described.

[0158] For example, in the above Figure 1 When the environment architecture shown is initialized, the trusted authority will initialize each node and device in the entire environment architecture during the initialization phase.

[0159] Specifically, first, the trusted institution needs to select its own public-private key pair. For example, the public-private key pair selected by the trusted institution can be (SK TA , PK TA ) Among them, SK TA is the private key, PK TA is the public key.

[0160] For example, the trusted institution may select its own public-private key pair by running a key generation algorithm to generate a public-private key pair. The signature private key SK is: in, is a set of numbers {1, ..., q-1}, where q is a large prime number. The signature public key PK is: PK i =G*SK i ∈G', where G is a cyclic subgroup of the finite group G'.

[0161] Based on the generated signature private key SK and signature public key PK, the trusted organization selects one of the pairs as the public-private key pair after this initialization.

[0162] After the trusted organization selects its own public-private key pair, it publishes public parameters, which include but are not limited to prime cyclic groups, orders, generators, and hash functions, etc. The specific values ​​of each public parameter are preset values, which are determined by the participating organizations through consultation.

[0163] Then, all parties accessing the blockchain for the first time, including the accounting node, the first device, and the second device, need to register with a trusted institution so that the trusted institution can issue public and private key pairs and corresponding electronic certificates to the accounting node, the first device, and the second device respectively as their respective identity identifiers for accessing the blockchain network.

[0164] For example, the registration process can be that the accounting node, the first device, and the second device upload their own device identification (device ID) and public key (PK) to the trusted institution. After verifying that the two pieces of information are correct, the trusted institution will issue the corresponding public and private key pairs and electronic certificates to each device, where the electronic certificate is identified as cert i ←sign(sk i ,pk i ,time,ID i ).

[0165] The public and private key pair and electronic certificate obtained by registering the first device are (sk1, pk1, cert Ν1 ,add Ν1 ), where N1 represents the first device.

[0166] The public and private key pair and electronic certificate obtained by registering the second device are (sk2, pk2, cert Ν2 ,add Ν2 ), where N2 represents the first device.

[0167] The public and private key pairs and electronic certificates obtained by the bookkeeping node registration are (sk b1 ,pk b1 ,cert b1 ,add b1 ), where b1 represents the accounting node.

[0168] The public and private key pairs and electronic certificates obtained by registering other accounting nodes (generally referring to any accounting node other than the accounting node) are (sk b2 ,pk b2 ,cert b2 ,add b2 ), where b2 represents other accounting nodes.

[0169] It should be noted here that, in the environment architecture of the embodiment of the present application, the public key obtained by each element from the registered trusted organization is public, but the private key is unique to itself.

[0170] S202, obtaining a transaction identifier corresponding to the search information from the blockchain by executing a search command of the smart contract.

[0171] Since the accounting node may publish the information reconciliation result by carrying the information reconciliation result in the transaction information, and the transaction information has a transaction identifier, a mapping relationship is pre-marked between the transaction identifier and the public key of the first device. Therefore, after the first device inputs its own public key into the search function and executes the generated search command, the corresponding transaction identifier can be retrieved.

[0172] For example, assuming that the retrieval function is recorded as function Get(), the first device inputs its own public key pk1 into function Get() to form function Get(pk1), and then executes function Get(pk1) to retrieve the transaction identifier TxID with which it has a mapping relationship.

[0173] S203, obtaining an information reconciliation result according to the transaction information corresponding to the transaction identifier.

[0174] Based on the determined transaction identifier TxID, it retrieves the transaction information corresponding to the transaction identifier, thereby obtaining the information reconciliation result Seq in the transaction information 1-2 .

[0175] In the embodiment of the present application, the first device inputs its own public key as the retrieval information into the retrieval function, thereby executing the retrieval command of the smart contract, obtaining the transaction identifier with the mapping relationship with the public key of the first device, and then locating the transaction information with the transaction identifier to obtain the required information reconciliation result. In this way, the information reconciliation result is retrieved along the pre-established mapping relationship, which reduces the risk of erroneous retrieval and greatly increases the accuracy of the retrieved information reconciliation result.

[0176] The generation process of the above information reconciliation result is described below through some embodiments.

[0177] The information reconciliation result is generated by the accounting node. In one embodiment, the information reconciliation result is obtained by the accounting node performing an information reconciliation operation on the first phase quantization information and the second phase quantization information when the bits between the first phase quantization information and the second phase quantization information meet a preset condition; wherein the first phase quantization information is generated by the first device based on the physical characteristics of the communication channel, and the second phase quantization information is generated by the second device based on the physical characteristics of the communication channel.

[0178] In the embodiment of the present application, when the accounting node generates an information reconciliation result, it is obtained by performing an information reconciliation operation on the first phase quantization information of the first device and the second phase quantization information of the second device.

[0179] The first phase quantization information of the first device is generated by the first device based on the physical characteristics of the communication channel, and naturally, the second phase quantization information of the second device is generated by the second device based on the physical characteristics of the communication information.

[0180] In combination with the above-mentioned embodiments, it can be known that although the communication channel is a channel of the physical layer established between the first device and the second device, due to the imperfect physical characteristics of the physical layer channel, such as noise, interference, reciprocity, etc., there is a difference between the data signal received by the first device from the physical channel and the data signal received by the second device from the physical channel. Therefore, the first phase quantization information is generated by the first device and is used to reflect that the first device receives a data signal from the physical channel. Similarly, the second phase quantization information is generated by the second device and is used to reflect that the second device receives a data signal from the physical channel.

[0181] In the embodiment of the present application, the accounting node is an information reconciliation result generated based on the first phase quantization information and the second phase quantization information. Since the first phase quantization information of the first device is generated by the first device based on the physical characteristics of the communication channel, and the second phase quantization information of the second device is generated by the second device based on the physical characteristics of the communication information, it is equivalent to that the information reconciliation result substantially reconciles the difference between the data signal received by the first device from the communication channel and the data signal received by the second device from the communication channel. Therefore, the difference reconciliation is performed based on the physical characteristics of the communication channel of the physical layer, so that the information reconciliation result generated by the accounting node is more accurate.

[0182] After obtaining the first phase quantization information of the first device and the second phase quantization information of the second device, the accounting node needs to first determine whether the bits between the first phase quantization information and the second phase quantization information meet the preset conditions. If so, it will execute the process of information reconciliation operation on the first phase quantization information and the second phase quantization information.

[0183] The reason why the bits between the first phase quantization information and the second phase quantization information need to meet the preset conditions before the information reconciliation operation is performed is that, when the bits between the first phase quantization information and the second phase quantization information are not completely consistent, in theory, these inconsistent bits should be corrected. However, based on the principle of information security and non-leakage, while correcting the inconsistent bits, it is hoped that the information publicly exchanged between the first device and the second device is minimized. Therefore, if the correction of the inconsistent bits involves a lot of publicly exchanged information, the current first phase quantization information and the second phase quantization information are directly abandoned in the embodiment of the present application, and the subsequent information reconciliation operation is no longer performed.

[0184] In one embodiment, the preset condition includes that the number of consistent bits between the first phase quantization information and the second phase quantization information is greater than a preset threshold.

[0185] Assuming that the first phase quantization information and the second phase quantization information are both in the form of binary character strings, the bits in the first phase quantization information and the second phase quantization information are compared one by one, and if the number of consistent bits between the two is greater than a preset threshold, it is considered that the preset condition is met. This is because the more consistent bits there are between the first phase quantization information and the second phase quantization information, the less information needs to be publicly exchanged during correction, and the subsequent information reconciliation operation can be performed.

[0186] For example, the first phase quantization information is recorded as k S1 , the second phase quantization information is recorded as k S2 , the preset threshold is 5; then assuming k S1 =01011101, k S2 =01011110, k S1 and k S2 Both are 8 bits, and there are 6 bits that are consistent before them, and 6 is greater than 5, then it is considered that k S1 and k S2 The preset conditions have been met.

[0187] In the embodiment of the present application, the accounting node performs information reconciliation result calculation based on the first phase quantization information and the second phase quantization, and the information reconciliation calculation is performed only when the bits between the first phase quantization information and the second phase quantization information meet the preset condition. The preset condition is a condition for limiting the number of bits between the first phase quantization information and the second phase quantization information. The information reconciliation calculation is performed only when the number of consistent bits between the first phase quantization information and the second phase quantization information reaches a certain threshold, which not only avoids information leakage in the key generation process, ensures the information security of the key generation process, but also reduces the risk of resource waste.

[0188] In one embodiment, the accounting node may perform the information reconciliation operation by performing an XOR operation on the first phase quantization information and the second phase quantization information to obtain the information reconciliation result.

[0189] For example, the first phase quantization information is recorded as k S1 , the second phase quantization information is recorded as k S2 , and k S1 =01011101, k S2 =01011110 as an example. Then, an XOR operation is performed on the first phase quantization information and the second phase quantization information to obtain an information harmonization result.

[0190] In the embodiment of the present application, an XOR operation is used to calculate the information reconciliation result, so that the information reconciliation result is an operation result to indicate the correct order, which is equivalent to hiding the information of the correct bit order. On the basis of the security and reliability of the blockchain, the leakage of the information reconciliation result is further prevented, thereby ensuring the security of the information reconciliation result.

[0191] The first phase quantization information is generated by the first device, and the second phase quantization information is generated by the second device. Naturally, it is understandable that the accounting node needs to obtain the first phase quantization information from the first device, and obtain the second phase quantization information from the second device.

[0192] Then, in one embodiment, if Figure 4 As shown, before the accounting node generates the information reconciliation result according to the first phase quantization information and the second two-bit quantization information, the method further includes the following steps:

[0193] S301, generating a first information data packet of a first device based on first phase quantization information.

[0194] The first device generates a first information data packet using the first phase quantization information generated according to the physical characteristics of the communication channel. For example, the first device generates the first information data packet by encrypting the first phase quantization information or encapsulating the first phase quantization information.

[0195] Optionally, taking encryption processing as an example, the process of the first device generating a first information data packet of the first device based on the first phase quantization information includes: encrypting the first phase quantization information according to the public key of the accounting node to obtain the first encrypted phase quantization information. The first encrypted phase quantization information and the electronic certificate of the first device are packaged to obtain the first information data packet; the electronic certificate is obtained by the first device registering in a trusted institution of the blockchain.

[0196] Among them, the public key of the accounting node is obtained when the accounting node is registered in the trusted institution of the blockchain. Similarly, the electronic certificate of the first device is also obtained when it is registered from the trusted institution of the blockchain. The specific registration process can be referred to the description of the previous embodiment.

[0197] After the first device obtains the public key of the accounting node from the accounting node, it encrypts the first phase quantization information using the public key of the accounting node, and packages the encrypted first phase quantization information and its own electronic certificate to generate a first information data packet.

[0198] For example, the first device uses the public key pk of the accounting node b1 The first phase quantization result k S1 Perform encryption processing and obtain the encrypted result as Enc pkb1(k S1(2) ). Then the first device will Enc pkb1 (k S1(2) ) and your own electronic certificate cert N1 Packing is performed to obtain the first information data packet (Enc pkb1 (k S1(2) ),cert N1 ).

[0199] S302, sending a first information data packet to a billing node to instruct the billing node to generate an information reconciliation result according to the first information data packet and a second information data packet of a second device; the second information data packet is generated by the second device based on the second phase quantization information.

[0200] After generating the first information data packet, the first device sends the first information data packet to the accounting node.

[0201] Similarly, the second device will also generate a second information data packet based on the second phase quantization information, and send the second information data packet to the accounting node. The process of the second device generating the second information data packet may be that after the second device obtains the public key of the accounting node from the accounting node, it encrypts the second phase quantization information by using the public key of the accounting node, and packages the encrypted second phase quantization information and its own electronic certificate to generate the second information data packet.

[0202] For example, the second device uses the public key pk of the accounting node b1 The second phase quantization result k S2 Perform encryption processing and obtain the encrypted result as Enc pkb1 (k S2(2) ). Then the second device will Enc pkb1 (k S2(2) ) and your own electronic certificate cert N2 Packing is performed to obtain the second information data packet (Enc pkb1 (k S2(2) ),cert N2 ).

[0203] After the accounting node receives the first information data packet and the second information data packet, it can proceed with the process of reconciling the information results.

[0204] Specifically, because the first information data packet and the second information data packet contain not only the first phase quantization information and the second phase quantization information, but also the electronic certificates of the two devices, in one embodiment, the accounting node can verify the electronic certificate of the first device and the electronic certificate of the second device, and when both the electronic certificate of the first device and the electronic certificate of the second device are verified, the information reconciliation operation is performed according to the first phase quantization information and the second phase quantization information.

[0205] After receiving the first information data packet and the second information data packet, the accounting node verifies the electronic certificate of the first device and the electronic certificate of the second device carried therein, thereby verifying the credibility of the first device and the second device to ensure the reliability of the subsequent information reconciliation operation result process.

[0206] In one embodiment, the process of the accounting node verifying the electronic certificate of the first device and the electronic certificate of the second device includes: querying the electronic certificate of the first device and the electronic certificate of the second device in the certificate revocation list provided by the trusted authority of the blockchain; determining that the electronic certificate of the first device has been verified if the electronic certificate of the first device exists in the certificate revocation list; and determining that the electronic certificate of the second device has been verified if the electronic certificate of the second device exists in the certificate revocation list.

[0207] In the embodiment of the present application, the certificate revocation list provided by the trusted institution represents a collection of electronic certificates that have been distrusted by the trusted institution, that is, a list of certificates whose electronic certificates have been revoked. This certificate revocation list can be obtained by the accounting node from the trusted institution in real time to ensure the latest and correctness of the content in the certificate revocation list.

[0208] Then, the specific process is that the accounting node queries the electronic certificate of the first device and the electronic certificate of the second device in the certificate revocation list respectively. If the electronic certificate of the first device is found in the certificate revocation list, it indicates that the electronic certificate of the first device has been revoked and is unreliable. In this case, the electronic certificate verification of the first device fails, and the accounting node can ignore the first data information packet sent by the first device this time, and no longer executes the subsequent steps of performing information reconciliation operations based on the first phase quantization information and the second phase quantization information.

[0209] If the electronic certificate of the first device is not found in the certificate revocation list, it indicates that the electronic certificate of the first device has not been revoked. In this case, the electronic certificate verification of the first device passes, and the accounting node normally executes the subsequent steps of performing information reconciliation operations based on the first phase quantization information and the second phase quantization information.

[0210] Similarly, if the electronic certificate of the second device is found in the certificate revocation list, it means that the electronic certificate of the second device has been revoked and is untrustworthy. In this case, the electronic certificate verification of the second device fails, and the accounting node can ignore the second data information packet sent by the second device and no longer executes the subsequent steps of performing information reconciliation operations based on the first phase quantization information and the second phase quantization information.

[0211] If the electronic certificate of the second device is not found in the certificate revocation list, it indicates that the electronic certificate of the second device has not been revoked. In this case, the electronic certificate verification of the second device passes, and the accounting node normally executes the subsequent steps of performing information reconciliation operations based on the first phase quantization information and the second phase quantization information.

[0212] In an embodiment of the present application, the first device generates a first information data packet based on the first phase quantization information, and sends the first information data packet to the accounting node, so that the accounting node generates an information reconciliation result with the information data packet sent by the second device after receiving the first information data packet. In this method, the first phase quantization information is generated by the first device, so it needs to be actively sent by the first device to the accounting node, so that the accounting node can start the subsequent information reconciliation result acquisition process, which increases the timeliness of the information reconciliation result acquisition. In addition, the first device encrypts the first phase quantization information and sends it to the accounting node, so as to reduce the risk of information leakage during the data transmission process, and the first device uses the public key of the accounting node to encrypt the first phase quantization information, so that the accounting node can decrypt it with its own private key after receiving the encrypted first phase quantization information to obtain the correct first phase quantization information. Furthermore, when the first device sends the encrypted first phase quantization information, it also sends its own electronic certificate to the accounting node, so that the accounting node can verify the trustworthiness of the device based on the electronic certificate, and ensure the reliability of information in the subsequent information reconciliation result acquisition process. Similarly, each step of the process in which the second device generates a second information data packet based on the second phase quantization information and sends the second information data packet to the accounting node also has the above-mentioned effects, which will not be repeated here.

[0213] The process of the first device generating the first phase quantization information and the second device generating the second phase quantization information is described below through an embodiment.

[0214] like Figure 5 As shown, an embodiment of a process in which a first device generates first phase quantization information is provided, and the embodiment includes the following steps:

[0215] S401, generating a first channel sounding signal according to a first channel sounding sequence sent by a second device; the first channel sounding signal is a signal reflecting physical characteristics of a communication channel.

[0216] The first device receives a channel sounding detection sequence (referred to as a first channel sounding sequence) sent by the second device through a physical channel, and generates a first channel sounding signal based on the first channel sounding sequence.

[0217] The first channel sounding sequence may be a sounding sequence that does not carry any content. However, after being transmitted in the communication channel and arriving at the first device, the sounding sequence will carry some information reflecting the physical characteristics of the communication channel. Therefore, the first channel sounding signal generated by the first device based on the received first channel sounding sequence essentially represents a signal that can reflect the physical characteristics of the communication channel.

[0218] For example, the first channel detection sequence is recorded as Then, the first device is based on The generated signal can be written as: Among them, the signal α 21 It represents the forward channel gain of the detection sequence transmitted from the second device to the first device on the communication channel, θ 21 represents the phase response generated by the transmission of the detection sequence from the second device to the first device on the communication channel, η 21 (t) represents the additive Gaussian white noise generated when the detection sequence is transmitted from the second device to the first device on the communication channel, φ2 represents the initial phase of the second device, ω c t represents the bandwidth of the communication channel.

[0219] S402: Calculate first channel response phase information corresponding to the first device according to the first channel detection signal.

[0220] Based on the first channel detection signal generated above, the first device can calculate and obtain first channel response phase information.

[0221] For example, the first channel detection signal is For example, the first device may calculate the final phase of the channel response according to the formula Calculate, where S1 in the formula represents the first channel response phase information, φ1 represents the initial phase of the first device, φ 21 =φ2+θ 21 , while φ2 and θ 21 The specific value can be obtained according to the first channel detection signal.

[0222] S403: quantize the first channel response phase information to obtain first phase quantization information.

[0223] After the first device obtains the first channel response phase information, it quantizes the first channel response phase information to obtain the first phase quantization information.

[0224] The quantization process may be to convert the first channel response phase information from a continuous signal to a digital signal, the continuous signal is sampled to become a discrete signal, and the discrete signal is quantized to become a digital signal. For example, the first device quantizes the above-obtained S1 to obtain the first phase quantization information k s1 =01011101.

[0225] Similarly, in one embodiment, the process of the second device generating the second phase quantization information includes:

[0226] A second channel detection sequence is sent to the second device, where the second channel detection sequence is used to instruct the second device to generate a second channel detection signal, and second channel response phase information corresponding to the second device is calculated according to the second channel detection signal to quantize the second channel response phase information to obtain second phase quantization information.

[0227] The first device also sends a channel detection sequence (referred to as a second channel detection sequence) to the second device. After receiving the second channel detection sequence sent by the first device through the physical channel, the second device generates a second channel detection signal based on the second channel detection sequence.

[0228] The second channel sounding sequence may also be a sounding sequence that does not carry any content. However, after being transmitted in the communication channel, the sounding sequence will carry some information reflecting the physical characteristics of the communication channel when it reaches the second device. Therefore, the second channel sounding signal generated by the second device based on the received second channel sounding sequence actually represents a signal that can reflect the physical characteristics of the communication channel.

[0229] For example, the second channel detection sequence is recorded as Then, the second device is based on The generated signal can be written as: Among them, the signal α 12 It represents the forward channel gain of the detection sequence on the communication channel when it is transmitted from the first device to the second device, θ 12 represents the phase response generated when the detection sequence is transmitted from the first device to the second device on the communication channel, η 12 (t) represents the additive white Gaussian noise generated when the detection sequence is transmitted from the first device to the second device on the communication channel, φ1 represents the initial phase of the first device, ω c t represents the bandwidth of the communication channel.

[0230] Based on the second channel sounding signal generated above, the second device may calculate and obtain second channel response phase information.

[0231] The second channel detection signal is For example, the second device may calculate the final phase of the channel response according to the formula Calculate, where S2 in the formula represents the second channel response phase information, φ2 represents the initial phase of the second device, and φ 12 =φ1+θ 12 , where φ1 and θ 12 The specific value can be obtained according to the second channel detection signal.

[0232] After the second device obtains the second channel response phase information, it quantizes the second channel response phase information to obtain second phase quantization information.

[0233] The quantization process may be to convert the second channel response phase information from a continuous signal to a digital signal, the continuous signal is sampled to become a discrete signal, and the discrete signal is quantized to become a digital signal. For example, the second device quantizes the first phase quantization information k obtained above. S2 =01011110.

[0234] In the embodiment of the present application, the first device and the second device obtain the first phase quantization information and the second phase quantization information respectively through the channel detection and phase quantization methods. Since the first channel detection signal generated by the first device based on the channel detection sequence and the second channel detection signal generated by the second device are both signals reflecting the physical characteristics of the physical channel between the first device and the second device, the first phase quantization information and the second phase quantization information finally obtained can accurately quantify the signal difference between the first device and the second device due to the imperfect characteristics of the communication channel. Furthermore, the information reconciliation result determined by the accounting node based on the first phase quantization information and the second phase quantization information can be more accurate.

[0235] The communication channel between the first device and the second device mentioned above is a preliminary, unencrypted, and insecure communication channel established when the first device and the second device initially have a communication need.

[0236] The process of establishing the communication channel between the first device and the second device is described below through an embodiment.

[0237] In one embodiment, Figure 6 As shown, the process of establishing a communication channel between the first device and the second device includes the following steps:

[0238] S501, in response to a communication demand with a second device, performing two-way authentication with the second device.

[0239] When the first device needs to communicate with the second device, it will initiate two-way authentication with the second device.

[0240] The communication demand may be generated when the first device receives a user-triggered instruction, which instructs the first device to send specific information to the second device. Alternatively, the communication demand may be generated when the first device actively detects that data that needs to be sent to the second device is generated according to a preset program. Of course, the second device may generate a communication demand to communicate with the first device in the above manner, or the first device and the second device may simultaneously generate a communication demand to communicate with each other in the above manner.

[0241] Bidirectional authentication refers to a process in which a first device and a second device authenticate each other and each confirms the credibility of the other.

[0242] For example, the process of two-way authentication between the first device and the second device may be that the second device authenticates the first device first, and then the first device authenticates the second device, or both the first device and the second device send information to a third-party device, and the third-party device performs two-way authentication on both parties. This embodiment of the application is not limited to this.

[0243] S502: When the two-way authentication is passed, it is determined that the communication channel is legally established.

[0244] When the first device and the second device pass the two-way authentication, the communication channel between the first device and the second device is legally established. It can be understood that the communication channel established between the first device and the second device is only a preliminary channel that cannot communicate securely.

[0245] In the embodiment of the present application, when the first device has a communication demand with the second device, the first device performs a two-way authentication with the second device, and when it is determined that the two-way authentication is passed, the communication channel between the first device and the second device is legally established. This is equivalent to establishing a communication channel between the first device and the second device based on the two-way authentication of both parties, and the two-way authentication can ensure the credibility between the first device and the second device, making the establishment of the communication channel between the first device and the second device more secure and reliable.

[0246] Taking the above-mentioned second device authenticating the first device and then the first device authenticating the second device as an example, an embodiment of a process of two-way authentication between the first device and the second device is provided, such as Figure 7 As shown, this embodiment includes the following steps:

[0247] S601, sending a first communication request to a second device, where the first communication request carries an electronic certificate and an electronic signature of the first device.

[0248] The first device sends a first communication request carrying its own electronic certificate and electronic signature to the second device. For example, the first communication request can be recorded as <cert N1 ,T1,sign N1 >, where cert N1 The electronic certificate of the first device, sign N1 is the electronic signature of the first device, and T1 is the valid time period, such as 5 minutes, 3 minutes, etc.

[0249] The first communication request may be sent in an initial transmission time period when the first device starts data transmission when a need to communicate with the second device is generated.

[0250] The electronic certificate of the first device is obtained by registering with a trusted institution, and the registration process can be referred to above. The electronic signature of the first device can be generated by the first device using its own private key or public key or public-private key pair registered with a trusted institution. For example, the first device uses its own private key to encrypt some data content to obtain an electronic signature, wherein the data content includes but is not limited to the current time information, location information, digital summary, etc.

[0251] S602, receiving a second communication request returned by the second device, where the second communication request is sent when the second device determines that the electronic certificate and electronic signature of the first device are both verified, and the second communication request carries the electronic certificate and electronic signature of the second device.

[0252] After the first device sends the first communication request to the second device, the second device returns a second communication request.

[0253] For example, after the second device receives the electronic signature of the electronic certificate of the first device from the first device, the second device needs to verify the electronic certificate and the electronic signature of the first device.

[0254] For example, the second device may verify the electronic certificate of the first device in such a way that the second device first obtains the latest certificate revocation list from a trusted authority, and then queries the electronic certificate of the first device in the certificate revocation list. If the second device finds the latest certificate revocation list, it indicates that the electronic certificate of the first device has been revoked, and it is determined that the electronic certificate of the first device has failed the verification. If the electronic certificate of the first device is not found in the certificate revocation list, it indicates that the electronic certificate of the first device is credible, and it is determined that the electronic certificate of the first device has passed the verification.

[0255] The second device may verify the electronic signature of the first device by using the public key of the first device to decrypt the electronic signature. If the decryption is successful, it indicates that the electronic signature of the first device has been verified successfully.

[0256] After the second device verifies the electronic certificate and electronic signature of the first device, it sends a second communication request to the first device, and the second communication request carries the electronic certificate and electronic signature of the second device. For example, the first communication request can be recorded as <cert N2 ,T2,sign N2 >, where cert N2 The electronic certificate of the second device, sign N2 It is the electronic signature of the second device, and T2 is the valid time period, such as 5 minutes, 3 minutes, etc.

[0257] The purpose of the second device sending the second communication request to the first device is to allow the first device to verify the electronic certificate and electronic signature of the second device.

[0258] Of course, if the second device determines that any or all of the electronic certificate and electronic signature of the first device have not been verified, it will not send the second communication request to the first device. If the first device does not receive the second communication request sent by the second device, it will default to the failure of the two-way authentication. Alternatively, the second device can send a verification failure message to the first device to actively inform the first device that the two-way authentication has failed.

[0259] S603: When both the electronic certificate and the electronic signature of the second device pass the verification, it is determined that the two-way authentication is passed.

[0260] After the first device receives the electronic certificate and electronic signature of the second device, the process of verifying the electronic certificate and electronic signature of the second device is consistent with the above-mentioned process of the second device verifying the electronic certificate and electronic signature of the first device, and will not be repeated here.

[0261] If the first device determines that the electronic certificate and electronic signature of the second device are both verified, the first device and the second device are mutually authenticated. After the mutual authentication is passed, the first device can return a successful authentication response message to the second device to inform the second device that the authentication is successful.

[0262] However, if the first device determines that any or all of the electronic certificate and electronic signature of the second device have not been verified, the first device will ignore the communication request of the second device, that is, it will no longer respond to the second device. The second device does not receive the response message of the first device, and the two-way authentication fails by default. Of course, the first device can also send a response message of authentication failure to the second device, which can also make the second device clear that the two-way authentication has failed.

[0263] In an embodiment of the present application, the first device sends a first communication request carrying the electronic certificate and electronic signature of the first device to the second device, and then receives a second communication request returned by the second device. The second communication request is sent by the second device when it determines that the electronic certificate and electronic signature of the first device have passed the verification, and carries the electronic certificate and electronic signature of the second device itself. Next, the first device verifies the electronic certificate and electronic signature of the second device, and when both pass the verification, it is determined that the two-way authentication is passed. In this embodiment, when performing two-way authentication between the first device and the second device, the first device and the second device each not only authenticate the other party's electronic certificate but also verify the other party's electronic signature. The double verification greatly improves the accuracy and reliability of the verification result.

[0264] The communication channel established between the first device and the second device mentioned in the above embodiment is only a preliminary channel that cannot communicate securely. Based on this, the key generation method in the embodiment of the present application is to generate a key for communication between the first device and the second device, so that the first device and the second device can communicate securely on the communication channel.

[0265] Then, in one embodiment, there is provided an embodiment of a key process of the first device based on the information reconciliation result in the above-mentioned embodiment, in which the first device generates the key of the first device according to the information reconciliation result and the first phase quantization information of the communication channel. The embodiment includes: adjusting the difference bits of the first phase quantization information according to the information reconciliation result to obtain the communication key of the first device.

[0266] In an embodiment of the present application, the first device obtains the information reconciliation result from the blockchain, and uses the information reconciliation result to adjust the difference bits of the first phase quantization information generated by itself based on the communication channel, and the adjustment result is its own communication key.

[0267] In the previous text, the information reconciliation result is obtained by performing an XOR operation on the first phase quantization information of the first device and the second phase quantization information of the second device. The first device performs a difference bit adjustment on the first phase quantization information according to the information reconciliation result, and the communication key of the first device can be obtained by performing an XOR operation on the first phase quantization information with the information reconciliation result.

[0268] In combination with the foregoing, it can be seen that when the first device uses the key generation method provided in the embodiment of the present application to generate the communication key of the first device, the second device will also obtain the information reconciliation result from the blockchain and synchronously generate the communication key of the second device, that is, the first device and the second device will each generate a communication key. Then the communication key of the second device generated by the second device is also obtained by the second device using the information reconciliation result to adjust the difference bit of the second phase quantization information generated by itself based on the communication channel.

[0269] It should be noted here that the main purpose of the difference bit adjustment is to correct the difference in the received signals of both parties caused by the physical characteristics of the communication channel, that is, the difference bit adjustment is to correct the bit difference between the first phase quantization information of the first device and the second phase quantization information of the second device. Therefore, in the scenario where the information reconciliation result is obtained based on the XOR operation of the first phase quantization information and the second phase quantization information, the communication key of the first device obtained by the first device performing the XOR operation on the first phase quantization information of the information reconciliation result is substantially completely consistent with the bits of the second phase quantization information.

[0270] In this regard, in one embodiment of the present application, the second device generates a communication key of the second device in such a manner that the second phase quantization information does not need to be adjusted in any way, and the second phase quantization information is directly used as the communication key of the second device.

[0271] In another embodiment, the second device may generate the communication key of the second device by performing two XOR operations on the second phase quantization information using the information reconciliation result, and obtain the operation result as the communication key of the second device.

[0272] For example, the first phase quantization information is recorded as k S1 , the second phase quantization information is recorded as k S2 , the communication key of the first device is recorded as K1, the communication key of the first device is recorded as K2, and the information reconciliation result Seq 1-2 It is based on k S1 and k S2 Take the XOR operation as an example.

[0273] Assume k S1 =01011101, k S2 =01011110, then Seq 1-2 =k S1 ⊕k S2 =00000011.

[0274] Then, the first device performs an XOR operation on the first phase quantization information using the information reconciliation result to obtain the communication key of the first device: K1 = Seq 1-2 ⊕k S1 =00000011⊕01011101=01011110.

[0275] Under this premise, in one embodiment, the second device generates a communication key for the second device as: K2=k S2 =01011110.

[0276] In another embodiment, the second device generates a communication key for the second device as: K2=(Seq1-2 ⊕k S2 )⊕Seq 1-2 =(00000011⊕01011110)⊕00000011=01011101⊕00000011=01011110.

[0277] Of course, in practical applications, for the first device and the second device, an agreement between the first device and the second device can be set in advance. For example, if the communication demand is initiated by the first device, the first device performs an XOR operation when adjusting the difference bit, and the second device does not perform an XOR operation or performs two XOR operations when adjusting the difference bit. On the contrary, the second device performs an XOR operation when adjusting the difference bit, and the first device does not perform an XOR operation or performs two XOR operations when adjusting the difference bit. The embodiment of the present application does not limit the agreement method between the two parties.

[0278] In the embodiment of the present application, the first device adjusts the difference bit of the first phase quantization information through the information reconciliation result obtained from the blockchain, so that the bit difference with the second device caused by the communication channel is corrected, and the correctness of the communication key generated by the first device is increased. In addition, after obtaining the information reconciliation result, the first device and the second device, in combination with the generation method of the information reconciliation result, perform the corresponding specific method of difference bit adjustment in accordance with the agreement between the two parties, so that the difference bit is completely corrected between the communication key of the first device and the communication key of the second device obtained in the end, and at the same time, the correctness of the communication keys of the first device and the second device is guaranteed, which lays a reliable foundation for the subsequent use of communication keys for secure communication.

[0279] Naturally, when the communication key generation is completed, the first device and the second device can communicate by using the communication key to establish an encrypted communication connection between the two parties based on the communication channel. Figure 8 As shown, in one embodiment, the method further comprises the following steps:

[0280] S701, encrypt the information to be transmitted according to the communication key to obtain encrypted transmission information.

[0281] The first device uses the communication key of the first device to encrypt the information to be transmitted. The information to be transmitted here is information for testing, so it can be any information, such as characters, texts, charts, etc.

[0282] The encryption method of the first device may be to run a pre-built-in encryption algorithm to encrypt the information to be transmitted.

[0283] S702: Send encrypted transmission information to the second device to instruct the second device to decrypt the encrypted transmission information using the communication key of the second device.

[0284] After the first device obtains the encrypted transmission information, the encrypted transmission information is sent to the second device.

[0285] After receiving the encrypted transmission information, the second device uses the communication key of the second device generated by itself to decrypt the information. The decryption method of the second device can also be a pre-built-in decryption algorithm.

[0286] After the second device completes decryption, if the decryption is successful, it returns a decryption success response message to the first device, and if the decryption fails, it returns a decryption failure response message to the first device. Alternatively, when the decryption fails, the second device does not send any message to the first device. If the first device does not receive a response message returned by the second device within a certain period of time, it determines that the decryption of the second device has failed.

[0287] S703: When the decryption by the second device is successful, determine to establish a secure encrypted communication connection with the second device.

[0288] If the first device determines that the second device has successfully decrypted the information, it is determined that a secure encrypted communication connection has been established between the first device and the second device. When information needs to be transmitted later, the first device can use the communication key of the first device for encrypted transmission, and the second device can use the communication key of the second device for decryption, thereby ensuring the security of information transmission between the two parties.

[0289] In the embodiment of the present application, the first device encrypts the information to be transmitted according to the communication key to obtain the encrypted transmission information, sends the encrypted transmission information to the second device, instructs the second device to decrypt the encrypted transmission information using the communication key of the second device, and determines to establish a secure encrypted communication connection with the second device when the second device decrypts successfully. This is equivalent to the first device and the second device performing communication key verification after each obtaining the communication key, and determining that a secure encrypted communication connection is established between the first device and the second device after the verification is successful, thereby increasing the security of the communication between the first device and the second device.

[0290] In addition, the embodiments of the present application also provide an embodiment of a key generation method with an accounting node as the execution entity.

[0291] It should be noted that the embodiments of the key generation methods implemented with the accounting node as the execution subject are the same as the concepts, principles and implementation processes of the key generation methods with the first device as the execution subject, and the effects that can be achieved. Therefore, the above description of the embodiments of the key generation methods with the first device as the execution subject is all applicable to the specific implementation process of the method steps in the embodiments executed by the following accounting nodes. The same parts and the same beneficial effects of the embodiments executed by the following accounting nodes will not be repeated here.

[0292] The present application embodiment provides a key generation method, in which each step is implemented by an accounting node, such as Fig. 9 As shown, this embodiment may include the following steps:

[0293] S801, reconcile the bit difference caused by the communication channel between the first device and the second device to obtain an information reconciliation result.

[0294] S802, publishing the information reconciliation result on the blockchain through a smart contract; the information reconciliation result is used to generate a communication key of the first device based on the first phase quantization information between the first device and the communication channel, and to generate a communication key of the second device based on the second phase quantization information between the second device and the communication channel.

[0295] In one embodiment, the process of publishing the information reconciliation result on the blockchain through the smart contract includes: publishing the information reconciliation result on the blockchain by calling the publishing function of the smart contract.

[0296] In one embodiment, Fig.10 As shown, the process of publishing the information reconciliation result on the blockchain by calling the publishing function of the smart contract includes the following steps:

[0297] S901, generating transaction information according to the information reconciliation result, the public key of the first device and the public key of the second device.

[0298] S902, input the transaction information into the publishing function to generate a publishing command for the smart contract.

[0299] S903, publish transaction information on the blockchain by executing the publishing command of the smart contract.

[0300] In one embodiment, the method further includes: generating a transaction identifier for the transaction information; and associating the public key of the first device, the public key of the second device, and the transaction identifier by calling a marking function of the smart contract.

[0301] In one embodiment, before publishing the information reconciliation result on the blockchain through the smart contract, the method also includes: inputting the address of the accounting node into the deployment function of the smart contract, and determining that the accounting node is the creator of the smart contract.

[0302] In one embodiment, Fig.11 As shown, the process of reconciling the bit difference caused by the communication channel between the first device and the second device to obtain the information reconciliation result includes the following steps:

[0303] S1001, obtaining first phase quantization information and second phase quantization information; the first phase quantization information is generated by the first device based on the physical characteristics of the communication channel, and the second phase quantization information is generated by the second device based on the physical characteristics of the communication channel.

[0304] S1002: Compare the bit difference between the first phase quantization information and the second phase quantization information.

[0305] S1003: When the bits between the first phase quantization information and the second phase quantization information meet a preset condition, perform an information harmonization operation on the first phase quantization information and the second phase quantization information to obtain an information harmonization result.

[0306] In one embodiment, the preset condition includes that the number of consistent bits between the first phase quantization information and the second phase quantization information is greater than a preset threshold.

[0307] In one embodiment, the process of obtaining the first phase quantization information and the second phase quantization information includes: receiving a first information data packet sent by a first device and a second information data packet sent by a second device, wherein the first information data packet includes the first phase quantization information and the electronic certificate of the first device, and the second information data packet includes the second phase quantization information and the electronic certificate of the second device.

[0308] In one embodiment, before comparing the bit difference between the first phase quantization information and the second phase quantization information, the method further includes verifying the electronic certificate of the first device and the electronic certificate of the second device; when the electronic certificate of the first device and the electronic certificate of the second device are both verified, performing the information reconciliation operation step.

[0309] In one embodiment, the process of verifying the electronic certificate of the first device and the electronic certificate of the second device includes: querying the electronic certificate of the first device and the electronic certificate of the second device in the certificate revocation list provided by a trusted authority of the blockchain; determining that the electronic certificate of the first device has been verified if the electronic certificate of the first device exists in the certificate revocation list; and determining that the electronic certificate of the second device has been verified if the electronic certificate of the second device exists in the certificate revocation list.

[0310] In one embodiment, the present application also provides an embodiment of a key generation method. In this embodiment, the first device is represented as device 1, the second device is represented as device 2, and the accounting node that manages the first device and the second device is accounting node 1 (see the above-mentioned Appendix Figure 1 Take the basic architecture of the system as an example, where device 1 and device 2 are both within the management scope of accounting node 1), other accounting nodes are represented as accounting node 2, and the trusted organization is represented as TA.

[0311] Specifically, the implementation process is as follows:

[0312] (1) System initialization: The trusted institution TA selects a public-private key pair (SK TA , PK TA ) and publish public parameters.

[0313] Among them, the published public parameters include prime cyclic group, order, generator, and hash function.

[0314] (2) Device 1, Device 2, Accounting Node 1 and Accounting Node 2 register their information at TA and obtain their corresponding public and private key pairs and electronic certificates. They are:

[0315] Device 1: (sk1, pk1, cert N1 ,add N1 ), device 2: (sk2,pk2,cert Ν2 ,add Ν2 );

[0316] Accounting Node 1: (sk b1 ,pk b1 ,cert b1 ,add b1 ), accounting node 2: (sk b2 ,pk b2 ,cert b2 ,add b2 ).

[0317] (3) When device 1 and device 2 have a communication need, device 1 and device 2 start initial authentication. In the initial transmission time period T1, device 1 sends a communication request to device 2. The communication request uses an electronic signature and is attached with an electronic certificate distributed by TA to device 1. The communication request information is shown as follows: <cert N1 ,T1,sign N1 >.

[0318] (4) After receiving the communication request, device 2 verifies the electronic certificate and electronic signature of device 1.

[0319] (5) Device 2 verifies whether the electronic certificate of device 1 is credible through the certificate revocation list provided by TA. And device 2 verifies the electronic signature of device 1 through public key pk2. If the verification is successful, device 2 responds to the communication request of device 1, and the communication request information of the response includes <cert N2 ,T2,sign N2 > If the verification fails, device 2 ignores the communication request.

[0320] (6) Device 1 verifies the electronic certificate and electronic signature of Device 2 in the same way. If both are verified successfully, the two parties have established a legal connection; if the verification fails, Device 1 ignores the communication request.

[0321] (7) After establishing a legitimate connection, device 1 sends a channel detection sequence to device 2. Device 2 receives the signal and records it as

[0322] (8) Device 2 sends a channel detection sequence to device 1 Device 1 receives the signal and records it as

[0323] (9) Device 1 calculates the final phase of the channel response where φ 21 =φ2+θ 21 .

[0324] (10) Device 2 calculates the final phase of the channel response where φ 12 =φ1+θ 12 .

[0325] (11) Device 1 quantizes the received phase information to obtain k S1 , and device 2 quantizes the received phase information to obtain k s2 .

[0326] (12) Device 1 uses the public key pk of accounting node 1 b1 The quantified result k s1 Encryption is performed to obtain Enc pkb1 (k S1(2) ) and attach your own electronic certificate to form a data package (Enc pkb1 (k S1(2) ),cert N1 ), and then the data packet (Enc pkb1 (k S1(2) ),cert N1 ) is sent to accounting node 1.

[0327] (13) Device 2 uses the public key pk of accounting node 1 b1 The quantified result k s2 Encryption is performed to obtain Enc pkb1 (k S2(2) ) and attach your own electronic certificate to form a data package (Enc pkb1 (k S2(2) ),cert N2 ), and then the data packet (Enc pkb1 (k S2(2) ),cert N2 ) is sent to accounting node 1.

[0328] (14) Accounting Node 1 verifies whether the electronic certificates of Device 1 and Device 2 are credible by querying the certificate revocation list provided by TA. Regardless of whether it is the electronic certificate of Device 1 or the electronic certificate of Device 2, if the certificate is in the revocation list, Accounting Node 1 ignores the device message; otherwise, it determines that the electronic certificate verification has passed.

[0329] (15) Accounting node 1 confirms k s1 and k s2 Is there a sufficient proportion of consistent bits? If so, perform information reconciliation operation to obtain the information reconciliation result Seq 1-2 =k S1 ⊕k S2 The information reconciliation result is k s1 and k s2 Correct order of difference bits.

[0330] (16) Accounting node 1 creates a smart contract and adds its own address b1 As input, functionDeployer() is called again to specify accounting node 1 as the creator of the smart contract.

[0331] (17) Accounting node 1 calls function PublishSeq(pk1,pk2,Seq 1-2 ), generate a transaction information including the transaction TxID and the corresponding public key information pk1, pk2 of both devices.

[0332] (18) Accounting node 1 calls function Update(pk1,pk2,TxID) to map the public key pair pk1,pk2 of device 1 and device 2 to the transaction TxID;

[0333] (19) Device 1 and Device 2 retrieve the smart contract by calling the smart contract command function Get(pk1,pk2) to obtain the corresponding TxID, and use this transaction to obtain Seq 1-2 .

[0334] (20) Device 1 obtains the key K1=Seq by calculation 1-2 ⊕k S1 , device 2 also obtains the key K2 through calculation = (Seq 1-2 ⊕k S2 )⊕Seq 1-2 Or K2 = k S2 .

[0335] (21) Device 1 encrypts the information using key K1 and sends the encrypted information to device 2. After receiving the information, device 2 decrypts the encrypted information using key K2. If the decryption is successful, device 1 and device 2 establish a secure encrypted communication connection; if the decryption fails, device 2 ignores the communication request.

[0336] The implementation principle and implementation method of each step in this embodiment and the technical effects that can be achieved are the same as those described in the above embodiments, and reference can be made to the above description of the key generation method embodiments in which the first device is the execution subject. No further description will be given here.

[0337] In this embodiment, a scheme for completing key generation by using smart contracts in physical layer security is provided. The key information in information reconciliation is released by smart contracts, and the characteristics of blockchain that cannot be changed, open and transparent are used to ensure the credibility of the accounting node as a third party. At the same time, because of the programmable system of smart contracts, devices 1 and 2 can still call the information released by them through the program of smart contracts without the need to fully store the distributed ledger of blockchain. It is precisely because of the four functional functions set for smart contracts that devices 1 and 2 can still view the transaction information recorded in the blockchain without participating in the blockchain network. In this way, the reconciliation of the bit difference between the two parties during the key generation process and the characteristics of blockchain ensure the information security of the key generation process and avoid key leakage. Furthermore, devices 1 and 2 only need to obtain the information reconciliation results from the blockchain to generate their own communication keys, which simplifies the process of generating keys for devices 1 and 2 and significantly reduces the energy consumption of devices 1 and 2.

[0338] Based on the same inventive concept, the embodiment of the present application also provides a key generation device for implementing the key generation method involved above. The implementation principle and implementation method of each embodiment of the key generation device in the present application and the technical effects that can be achieved are the same as those described in the above embodiments, and reference can be made to the above description of each key generation method embodiment with the first device as the execution subject. No further description will be given.

[0339] In one embodiment, the present application provides a key generation device, such as Fig.12As shown, the device includes: an acquisition module 121 and a generation module 122, wherein:

[0340] The acquisition module 121 is used to obtain the information reconciliation result from the blockchain through the smart contract; the information reconciliation result is the result of the accounting node of the blockchain reconciling the bit difference caused by the communication channel between the first device and the second device;

[0341] The generating module 122 is used to generate a communication key of the first device according to the information reconciliation result and the first phase quantization information of the communication channel.

[0342] In one embodiment, the acquisition module 121 includes: an acquisition unit, configured to acquire information reconciliation results from the blockchain by calling a retrieval function of a smart contract.

[0343] In one embodiment, the acquisition unit includes:

[0344] A retrieval command generation subunit, used to input the retrieval information into the retrieval function to generate a retrieval command for the smart contract;

[0345] A retrieval subunit, configured to obtain a transaction identifier corresponding to retrieval information from the blockchain by executing a retrieval command of the smart contract; the retrieval information includes a public key of the first device;

[0346] The result acquisition subunit is used to acquire the information reconciliation result according to the transaction information corresponding to the transaction identifier.

[0347] In one embodiment, the transaction information is generated by the accounting node based on the information reconciliation result, the public key of the first device and the public key of the second device, and is published on the blockchain by calling the publishing function of the smart contract.

[0348] In one embodiment, the accounting node associates the public key of the first device, the public key of the second device, and the transaction identifier by calling a marking function of the smart contract.

[0349] In one embodiment, the accounting node is determined as the creator of the smart contract by inputting its own address into the deployment function of the smart contract.

[0350] In one embodiment, the above-mentioned information reconciliation result is obtained by the accounting node performing information reconciliation operation on the first phase quantization information and the second phase quantization information when the bits between the first phase quantization information and the second phase quantization information meet preset conditions; the first phase quantization information is generated by the first device based on the physical characteristics of the communication channel, and the second phase quantization information is generated by the second device based on the physical characteristics of the communication channel.

[0351] In one embodiment, the preset condition includes that the number of consistent bits between the first phase quantization information and the second phase quantization information is greater than a preset threshold.

[0352] In one embodiment, the apparatus further comprises:

[0353] A signal generating module, configured to generate a first channel sounding signal according to a first channel sounding sequence sent by the second device; the first channel sounding signal represents a signal reflecting the physical characteristics of the communication channel;

[0354] A phase calculation module, used to calculate first channel response phase information corresponding to the first device according to the first channel detection signal;

[0355] The phase quantization module is used to quantize the first channel response phase information to obtain first phase quantization information.

[0356] In one embodiment, the apparatus further comprises:

[0357] A sequence sending module is used to send a second channel detection sequence to a second device, where the second channel detection sequence is used to instruct the second device to generate a second channel detection signal, and calculate the second channel response phase information corresponding to the second device based on the second channel detection signal to quantize the second channel response phase information to obtain second phase quantization information.

[0358] In one embodiment, the apparatus further comprises:

[0359] A data packet generating module, configured to generate a first information data packet of a first device based on the first phase quantization information;

[0360] The data packet sending module is used to send a first information data packet to the accounting node to instruct the accounting node to generate an information reconciliation result based on the first information data packet and the second information data packet of the second device; the second information data packet is generated by the second device based on the second phase quantization information.

[0361] In one embodiment, the data packet generation module includes:

[0362] An encryption unit, used to encrypt the first phase quantization information according to the public key of the accounting node to obtain the first encrypted phase quantization information;

[0363] The packaging unit is used to package the first encrypted phase quantization information and the electronic certificate of the first device to obtain a first information data packet; the electronic certificate is obtained by the first device registering in a trusted institution of the blockchain.

[0364] In one embodiment, the apparatus further comprises:

[0365] The authentication module is used to perform two-way authentication with the second device in response to a communication demand with the second device; if the two-way authentication passes, it is determined that the communication channel is legally established.

[0366] In one embodiment, the authentication module includes:

[0367] A communication request sending unit, configured to send a first communication request to the second device, wherein the first communication request carries an electronic certificate and an electronic signature of the first device;

[0368] a communication request receiving unit, configured to receive a second communication request returned by the second device, wherein the second communication request is sent when the second device determines that the electronic certificate and the electronic signature of the first device are both verified, and the second communication request carries the electronic certificate and the electronic signature of the second device;

[0369] The authentication pass determination unit is used to determine that the two-way authentication is passed when both the electronic certificate and the electronic signature of the second device are verified.

[0370] In one embodiment, the generation module 122 includes: a key generation unit, configured to perform differential bit adjustment on the first phase quantization information according to the information reconciliation result to obtain a communication key of the first device.

[0371] In one embodiment, the apparatus further comprises:

[0372] The encryption information module is used to encrypt the information to be transmitted according to the communication key to obtain the encrypted transmission information;

[0373] An information transmission module, used to send encrypted transmission information to the second device to instruct the second device to decrypt the encrypted transmission information using the communication key of the second device;

[0374] The encrypted communication determination module is used to determine to establish a secure encrypted communication connection with the second device when the decryption by the second device is successful.

[0375] In one embodiment, the present application provides a key generation device, such as Fig.13 As shown, the device includes: a reconciliation module 131 and a publishing module 132; wherein,

[0376] A reconciliation module 131, configured to reconcile a bit difference caused by a communication channel between the first device and the second device to obtain an information reconciliation result;

[0377] The publishing module 132 is used to publish the information reconciliation result on the blockchain through a smart contract; the information reconciliation result is used to generate a communication key of the first device based on the first phase quantization information of the first device and the communication channel, and to generate a communication key of the second device based on the second phase quantization information of the second device and the communication channel.

[0378] In one embodiment, the publishing module 132 includes: a result publishing unit, configured to publish the information reconciliation result on the blockchain by calling a publishing function of a smart contract.

[0379] In one embodiment, the result publishing unit includes:

[0380] A transaction information generation subunit, configured to generate transaction information according to the information reconciliation result, the public key of the first device and the public key of the second device;

[0381] The release command generation subunit is used to input the transaction information into the release function to generate the release command of the smart contract;

[0382] The information publishing subunit is used to publish transaction information on the blockchain by executing the publishing command of the smart contract.

[0383] In one embodiment, the apparatus further comprises:

[0384] A transaction identification generation module, used to generate a transaction identification for transaction information;

[0385] The association module is used to associate the public key of the first device, the public key of the second device and the transaction identifier by calling the marking function of the smart contract.

[0386] In one embodiment, the device also includes: a creator determination module, which is used to input the address of the accounting node into the deployment function of the smart contract to determine that the accounting node is the creator of the smart contract.

[0387] In one embodiment, the above-mentioned reconciliation module 131 includes:

[0388] A quantization information acquisition unit, used to acquire first phase quantization information and second phase quantization information; the first phase quantization information is generated by the first device based on the physical characteristics of the communication channel, and the second phase quantization information is generated by the second device based on the physical characteristics of the communication channel;

[0389] A difference comparison unit, used for comparing the bit difference between the first phase quantization information and the second phase quantization information;

[0390] The harmonization result determining unit is used to perform information harmonization operation on the first phase quantization information and the second phase quantization information to obtain an information harmonization result when the bits between the first phase quantization information and the second phase quantization information meet a preset condition.

[0391] In one embodiment, the preset condition includes that the number of consistent bits between the first phase quantization information and the second phase quantization information is greater than a preset threshold.

[0392] In one embodiment, the quantitative information acquisition unit includes:

[0393] The data packet receiving subunit is used to receive a first information data packet sent by a first device and a second information data packet sent by a second device; the first information data packet includes first phase quantization information and an electronic certificate of the first device; the second information data packet includes second phase quantization information and an electronic certificate of the second device.

[0394] In one embodiment, the apparatus further comprises:

[0395] The certificate verification module is used to verify the electronic certificate of the first device and the electronic certificate of the second device; when the electronic certificate of the first device and the electronic certificate of the second device are both verified, the step of performing information reconciliation operation is performed.

[0396] In one embodiment, the certificate verification module includes:

[0397] A certificate query unit, configured to query the electronic certificate of the first device and the electronic certificate of the second device in a certificate revocation list provided by a trusted authority of the blockchain;

[0398] A first verification result determination unit, configured to determine that the electronic certificate of the first device has been verified if the electronic certificate of the first device exists in the certificate revocation list;

[0399] The second verification result determining unit is configured to determine that the verification of the electronic certificate of the second device has passed if the electronic certificate of the second device exists in the certificate revocation list.

[0400] Each module in the above-mentioned key generation device can be implemented in whole or in part by software, hardware or a combination thereof. Each module can be embedded in or independent of a processor in a computer device in the form of hardware, or can be stored in a memory in a computer device in the form of software, so that the processor can call and execute the operations corresponding to each module above.

[0401] In an exemplary embodiment, a network device is provided, which may be a ubiquitous Internet of Things device or other device with communication function. The network device includes a memory and a processor, the memory stores a computer program, and the processor implements the steps in the above method embodiments when executing the computer program.

[0402] The internal structure diagram of the network device can be shown as follows Fig.14As shown. The network device includes a processor, a memory, an input / output interface (Input / Output, referred to as I / O) and a communication interface. Among them, the processor, the memory and the input / output interface are connected through a system bus, and the communication interface is connected to the system bus through the input / output interface. Among them, the processor of the network device is used to provide computing and control capabilities. The memory of the network device includes a non-volatile storage medium and an internal memory. The non-volatile storage medium stores an operating system, a computer program and a database. The internal memory provides an environment for the operation of the operating system and the computer program in the non-volatile storage medium. The database of the network device is used to store data generated by the key generation process. The input / output interface of the network device is used to exchange information between the processor and an external device. The communication interface of the network device is used to communicate with an external terminal through a network connection. When the computer program is executed by the processor, the steps of the key generation method provided in any of the above embodiments of the present application are implemented.

[0403] Those skilled in the art will understand that Fig.14 The structure shown in the figure is only a block diagram of a partial structure related to the scheme in the embodiment of the present application, and does not constitute a limitation on the network device to which the scheme of the present application is applied. The specific network device may include more or fewer components than shown in the figure, or combine certain components, or have a different arrangement of components.

[0404] The implementation principles and technical effects of each step implemented by the processor in the network device in this embodiment are similar to the principles of the above-mentioned key generation method, and will not be repeated here.

[0405] In one embodiment, a server is further provided. The server includes a memory and a processor. The memory stores a computer program. When the processor executes the computer program, the steps in the above method embodiments are implemented.

[0406] The implementation principles and technical effects of each step implemented by the processor in the server in this embodiment are similar to the principles of the above-mentioned key generation method and will not be repeated here.

[0407] In one embodiment, a processor-readable storage medium is provided, on which a computer program is stored. When the computer program is executed by a processor, the steps in the above-mentioned method embodiments are implemented.

[0408] The implementation principles and technical effects of the steps implemented when the computer program in this embodiment is executed by the processor are similar to the principles of the above-mentioned key generation method, and will not be repeated here.

[0409] In one embodiment, a computer program product is provided, including a computer program, which implements the steps in the above method embodiments when executed by a processor.

[0410] The implementation principles and technical effects of the steps implemented when the computer program in this embodiment is executed by the processor are similar to the principles of the above-mentioned key generation method, and will not be repeated here.

[0411] It should be noted that the data involved in this application (including but not limited to data used for analysis, stored data, displayed data, etc.) are all information and data authorized by the user or fully authorized by all parties, and the collection, use and processing of relevant data must comply with relevant regulations.

[0412] Those skilled in the art can understand that all or part of the processes in the above-mentioned embodiment methods can be completed by instructing the relevant hardware through a computer program, and the computer program can be stored in a non-volatile computer-readable storage medium. When the computer program is executed, it can include the processes of the embodiments of the above-mentioned methods. Among them, any reference to the memory, database or other medium used in the embodiments provided in the present application can include at least one of non-volatile and volatile memory. Non-volatile memory can include read-only memory (ROM), magnetic tape, floppy disk, flash memory, optical memory, high-density embedded non-volatile memory, resistive random access memory (ReRAM), magnetoresistive random access memory (MRAM), ferroelectric random access memory (FRAM), phase change memory (PCM), graphene memory, etc. Volatile memory can include random access memory (RAM) or external cache memory, etc. As an illustration and not limitation, RAM can be in various forms, such as static random access memory (SRAM) or dynamic random access memory (DRAM). The database involved in each embodiment provided in this application may include at least one of a relational database and a non-relational database. Non-relational databases may include distributed databases based on blockchains, etc., but are not limited to this. The processor involved in each embodiment provided in this application may be a general-purpose processor, a central processing unit, a graphics processor, a digital signal processor, a programmable logic device, a data processing logic device based on quantum computing, etc., but are not limited to this.

[0413] The technical features of the above embodiments may be combined arbitrarily. To make the description concise, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this specification.

[0414] The above-described embodiments only express several implementation methods of the present application, and the descriptions thereof are relatively specific and detailed, but they cannot be understood as limiting the scope of the present application. It should be pointed out that, for a person of ordinary skill in the art, several variations and improvements can be made without departing from the concept of the present application, and these all belong to the protection scope of the present application. Therefore, the protection scope of the present application shall be subject to the attached claims.

Claims

1. A key generation method, characterized in that: Applied to a first device, the method includes: Obtaining an information reconciliation result from the blockchain through a smart contract; the information reconciliation result is a result of the accounting node of the blockchain reconciling the bit difference caused by the communication channel between the first device and the second device; A communication key of the first device is generated according to the information reconciliation result and the first phase quantization information of the communication channel.

2. The method according to claim 1, characterized in that The information reconciliation result obtained from the blockchain through the smart contract includes: By calling the retrieval function of the smart contract, the information reconciliation result is obtained from the blockchain.

3. The method according to claim 2, characterized in that The obtaining of information reconciliation results from the blockchain by calling the retrieval function of the smart contract includes: Inputting retrieval information into the retrieval function to generate a retrieval command for the smart contract; the retrieval information includes a public key of the first device; Obtaining a transaction identifier corresponding to the search information from the blockchain by executing a search command of the smart contract; The information reconciliation result is obtained according to the transaction information corresponding to the transaction identifier.

4. The method according to claim 3, characterized in that The transaction information is generated by the accounting node according to the information reconciliation result, the public key of the first device and the public key of the second device, and is published on the blockchain by calling the publishing function of the smart contract.

5. The method according to claim 3 or 4, characterized in that: The accounting node associates the public key of the first device, the public key of the second device and the transaction identifier by calling the marking function of the smart contract.

6. The method according to any one of claims 1 to 4, characterized in that: The accounting node determines the creator of the smart contract by inputting its own address into the deployment function of the smart contract.

7. The method according to any one of claims 1 to 4, characterized in that: The information reconciliation result is obtained by the accounting node performing an information reconciliation operation on the first phase quantization information and the second phase quantization information when the bits between the first phase quantization information and the second phase quantization information meet a preset condition; The first phase quantization information is generated by the first device based on the physical characteristics of the communication channel, and the second phase quantization information is generated by the second device based on the physical characteristics of the communication channel.

8. The method according to claim 7, characterized in that The preset condition includes that the number of consistent bits between the first phase quantization information and the second phase quantization information is greater than a preset threshold.

9. The method according to any one of claims 1 to 4, characterized in that: The method further comprises: generating a first channel sounding signal according to a first channel sounding sequence sent by the second device; the first channel sounding signal represents a signal reflecting the physical characteristics of the communication channel; Calculating first channel response phase information corresponding to the first device according to the first channel detection signal; The first channel response phase information is quantized to obtain the first phase quantization information.

10. The method according to claim 9, characterized in that The method further comprises: A second channel detection sequence is sent to the second device, where the second channel detection sequence is used to instruct the second device to generate a second channel detection signal, and second channel response phase information corresponding to the second device is calculated based on the second channel detection signal to quantize the second channel response phase information to obtain second phase quantization information.

11. The method according to any one of claims 1 to 4, characterized in that: The method further comprises: generating a first information data packet of the first device based on the first phase quantization information; The first information data packet is sent to the accounting node to instruct the accounting node to generate the information reconciliation result according to the first information data packet and the second information data packet of the second device; the second information data packet is generated by the second device based on the second phase quantization information.

12. The method according to claim 11, characterized in that The step of generating a first information data packet of the first device based on the first phase quantization information includes: Encrypt the first phase quantization information according to the public key of the accounting node to obtain first encrypted phase quantization information; The first encrypted phase quantization information and the electronic certificate of the first device are packaged to obtain the first information data packet; the electronic certificate is obtained by the first device registering in a trusted institution of the blockchain.

13. The method according to any one of claims 1 to 4, characterized in that: The method further comprises: In response to a communication demand with the second device, performing two-way authentication with the second device; In the case where the two-way authentication passes, it is determined that the communication channel is legally established.

14. The method according to claim 13, characterized in that The performing two-way authentication with the second device includes: Sending a first communication request to the second device, where the first communication request carries the electronic certificate and electronic signature of the first device; receiving a second communication request returned by the second device, where the second communication request is sent when the second device determines that the electronic certificate and the electronic signature of the first device are both verified, and the second communication request carries the electronic certificate and the electronic signature of the second device; When both the electronic certificate and the electronic signature of the second device pass the verification, it is determined that the two-way authentication passes.

15. The method according to any one of claims 1 to 4, characterized in that: The step of generating a communication key of the first device according to the information reconciliation result and the first phase quantization information of the communication channel includes: The first phase quantization information is subjected to difference bit adjustment according to the information reconciliation result to obtain a communication key of the first device.

16. The method according to any one of claims 1 to 4, characterized in that: The method further comprises: Encrypting the information to be transmitted according to the communication key to obtain encrypted transmission information; Sending the encrypted transmission information to the second device to instruct the second device to decrypt the encrypted transmission information using the communication key of the second device; In the event that the decryption by the second device is successful, it is determined to establish a secure encrypted communication connection with the second device.

17. A key generation method, characterized in that: Applied to an accounting node, the method includes: reconciling a bit difference caused by a communication channel between the first device and the second device to obtain an information reconciliation result; The information reconciliation result is published on the blockchain through a smart contract; the information reconciliation result is used to generate a communication key of the first device based on the first phase quantization information of the first device and the communication channel, and to generate a communication key of the second device based on the second phase quantization information of the second device and the communication channel.

18. The method according to claim 17, characterized in that The information reconciliation result is published on the blockchain through a smart contract, including: The information reconciliation result is published on the blockchain by calling the publishing function of the smart contract.

19. The method according to claim 18, characterized in that Publishing the information reconciliation result on the blockchain by calling the publishing function of the smart contract includes: Generate transaction information according to the information reconciliation result, the public key of the first device and the public key of the second device; Input the transaction information into the publishing function to generate a publishing command for the smart contract; The transaction information is published on the blockchain by executing a publishing command of the smart contract.

20. The method according to claim 19, characterized in that The method further comprises: generating a transaction identifier for the transaction information; By calling the marking function of the smart contract, the public key of the first device, the public key of the second device and the transaction identifier are associated.

21. The method according to any one of claims 17 to 20, characterized in that: Before publishing the information reconciliation result on the blockchain through the smart contract, the method further includes: The address of the accounting node is input into the deployment function of the smart contract to determine that the accounting node is the creator of the smart contract.

22. The method according to any one of claims 17 to 20, characterized in that: The step of reconciling the bit difference caused by the communication channel between the first device and the second device to obtain an information reconciliation result includes: Acquire first phase quantization information and second phase quantization information; the first phase quantization information is generated by the first device based on the physical characteristics of the communication channel, and the second phase quantization information is generated by the second device based on the physical characteristics of the communication channel; comparing a bit difference between the first phase quantization information and the second phase quantization information; When the bits between the first phase quantization information and the second phase quantization information meet a preset condition, an information reconciliation operation is performed on the first phase quantization information and the second phase quantization information to obtain the information reconciliation result.

23. The method according to claim 22, characterized in that The preset condition includes that the number of consistent bits between the first phase quantization information and the second phase quantization information is greater than a preset threshold.

24. The method according to claim 22, characterized in that The obtaining of the first phase quantization information and the second phase quantization information comprises: receiving a first information data packet sent by the first device and a second information data packet sent by the second device; The first information data packet includes the first phase quantization information and the electronic certificate of the first device; the second information data packet includes the second phase quantization information and the electronic certificate of the second device.

25. The method according to claim 24, characterized in that Before comparing the bit difference between the first phase quantization information and the second phase quantization information, the method further includes: verifying the electronic certificate of the first device and the electronic certificate of the second device; When both the electronic certificate of the first device and the electronic certificate of the second device are verified, the information reconciliation operation step is performed.

26. The method according to claim 25, characterized in that The verifying the electronic certificate of the first device and the electronic certificate of the second device includes: In the certificate revocation list provided by the trusted authority of the blockchain, query the electronic certificate of the first device and the electronic certificate of the second device; If the electronic certificate of the first device exists in the certificate revocation list, determining that the electronic certificate of the first device has passed verification; In a case where the electronic certificate of the second device exists in the certificate revocation list, it is determined that the electronic certificate of the second device passes verification.

27. A key generation device, characterized in that: The device comprises: An acquisition module, configured to acquire an information reconciliation result from a blockchain through a smart contract; the information reconciliation result is a result of the accounting node of the blockchain reconciling a bit difference caused by a communication channel between the first device and the second device; A generation module is used to generate a communication key of the first device according to the information reconciliation result and the first phase quantization information of the communication channel.

28. A key generation device, characterized in that: The device comprises: A reconciliation module, configured to reconcile a bit difference caused by a communication channel between the first device and the second device to obtain an information reconciliation result; A publishing module is used to publish the information reconciliation result on the blockchain through a smart contract; the information reconciliation result is used to generate a communication key of the first device based on the first phase quantization information of the first device and the communication channel, and to generate a communication key of the second device based on the second phase quantization information of the second device and the communication channel.

29. A network device, characterized in that: The network device comprises a memory and a processor, wherein the memory stores a computer program, and the processor implements the steps of the method according to any one of claims 1 to 16 when executing the computer program.

30. A server, characterized in that: The server comprises a memory and a processor, wherein the memory stores a computer program, and the processor implements the steps of the method according to any one of claims 17 to 26 when executing the computer program.

31. A processor-readable storage medium, characterized in that: The processor-readable storage medium stores a program for causing the processor to execute the steps of the method according to any one of claims 1 to 26.

Citation Information

Patent Citations

  • Use of supplemental resource assignments

    KR101011101B1