Disclosure of Invention
In view of this, the invention provides a block chain digital signature method, device and system based on quantum cryptography, which are used for solving the problems that the existing signature process mainly comprises four types, namely a lattice-based McElience cipher based on encoding and a digital signature scheme based on Hash and multivariable, the signature process is low in safety, the complexity of a key for generating and verifying the signature is increased for improving the safety, the key may occupy thousands of bytes, so that the signature process needs to occupy a large amount of cipher text overhead, occupies a large memory and affects the signature efficiency. The specific scheme is as follows:
a block chain digital signature method based on quantum cryptography is applied to a principal in a block chain, wherein the principal is generated based on an election mechanism, and the method comprises the following steps:
receiving a quantum signature and signature information sent by a sender;
under the condition that the receiver passes the verification of the quantum signature, receiving a quantum entrustment sent by the receiver;
verifying the signature information based on the quantum delegation;
and under the condition of passing the verification, receiving a private key pair sent by a receiver, and verifying the quantum signature based on the private key pair.
The above method, optionally, further includes:
sending the quantum entrusting to other nodes in the block chain, and calculating based on the quantum entrusting and a corresponding intelligent contract to obtain each contract calculation result;
and comparing the contract calculation results, and writing the message corresponding to the quantum entrusting into the block chain to finish consensus if the contract calculation results are the same.
Optionally, the method for verifying the signature information based on the quantum delegation includes:
interfering with the signature information based on the quantum delegation pair;
acquiring a first number of photoelectric detection events after the interference is completed;
and if the first quantity is smaller than a preset first quantity threshold value, judging that the signature information passes the authentication.
Optionally, the method described above, verifying the quantum signature based on the private key pair, where the private key pair includes a first private key pair and a second private key pair, includes:
disturbing corresponding quantum signatures based on the first private key pair and the second private key degree, respectively;
acquiring a second number of photoelectric detection events after the interference is completed;
and if the second quantity is smaller than a preset second quantity threshold value, judging that the quantum signature passes the authentication.
A block chain digital signature method based on quantum cryptography is applied to a sender in a block chain, and the method comprises the following steps:
generating a quantum signature and a private key corresponding to the message, and sending the quantum signature to a receiving party and a consignor;
and after the sending is finished, determining a quantum entrusting, determining a signature message based on the quantum entrusting and the message, sending the signature message to the entrusting party, and sending a private key pair corresponding to the private key and the quantum entrusting to the receiving party.
A block chain digital signature method based on quantum cryptography is applied to a receiver in a block chain, and the method comprises the following steps:
receiving a quantum signature, a private key pair and a quantum entrustment sent by a sender;
verifying the quantum signature based on the private key pair, and sending the quantum entrusted to an entrustor under the condition that the verification is passed;
and under the condition of receiving a verification passing instruction sent by the entrusting party, sending the private key pair to the entrusting party.
A block chain digital signature device based on quantum cryptography is applied to a principal in a block chain, wherein the principal is generated based on an election mechanism, and the device comprises:
the first receiving module is used for receiving the quantum signature and the signature information sent by the sender;
the second receiving module is used for receiving the quantum entrusts sent by the receiver under the condition that the receiver passes the verification of the quantum signatures;
a verification module to verify the signature information based on the quantum delegation;
and the receiving and verifying module is used for receiving a private key pair sent by a receiver under the condition of passing verification and verifying the quantum signature based on the private key pair.
A block chain digital signature device based on quantum cryptography is applied to a sender in a block chain, and the device comprises:
the generating and sending module is used for generating a quantum signature and a private key corresponding to the message and sending the quantum signature to the receiving party and the entrusting party;
and the determining and sending module is used for determining a quantum entrusting after the sending is finished, determining a signature message based on the quantum entrusting and the message, sending the signature message to the entrusting party, and sending a private key pair corresponding to the private key and the quantum entrusting to the receiving party.
A block chain digital signature side device based on quantum cryptography is applied to a receiving side in a block chain, and the device comprises:
the third receiving module is used for receiving the quantum signature, the private key pair and the quantum entrustment sent by the sender;
the verification and sending module is used for verifying the quantum signature based on the private key pair, and sending the quantum entrusted to an entrustor under the condition that the verification is passed;
and the sending module is used for sending the private key pair to the consignor under the condition of receiving the verification passing instruction sent by the consignor.
A quantum cryptography-based blockchain digital signature system, comprising: a sender, a receiver, and a delegator, wherein,
the sender is used for executing the block chain digital signature method based on the quantum cryptography applied to the sender;
the receiver is used for executing the quantum-password-based block chain digital signature method applied to the receiver;
the trustee is used for executing the block chain digital signature method based on the quantum cryptography applied to the trustee.
Compared with the prior art, the invention has the following advantages:
the invention discloses a block chain digital signature method, a device and a system based on quantum cryptography, which are applied to a principal in a block chain, wherein the principal is generated based on an election mechanism, and the method comprises the following steps: a receiving party and a trusting party receive the quantum signature and the signature information sent by a sending party; under the condition that the receiver passes the verification of the quantum signature, receiving a quantum entrustment sent by the receiver; the principal verifies the signature information based on the quantum delegation; and under the condition of passing the verification, receiving a private key pair sent by a receiver, and verifying the quantum signature based on the private key pair. In the process, the quantum signature, the quantum entrusting and the private key pair are constructed based on the quantum key technology, the entrusting party is selected based on the election mechanism, the quantum signature is verified by adopting the quantum key technology in the entrusting party, the entrusting party determined based on the election mechanism can fully ensure the fairness of the entrusting party in message verification, and the security can be ensured without a complex key due to the high safety of the quantum key, so the signature efficiency is improved.
Detailed Description
The technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the drawings in the embodiments of the present invention, and it is obvious that the described embodiments are only a part of the embodiments of the present invention, and not all of the embodiments. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present invention.
The previous description of the disclosed embodiments is provided to enable any person skilled in the art to make or use the present invention. Various modifications to these embodiments will be readily apparent to those skilled in the art, and the generic principles defined herein may be applied to other embodiments without departing from the spirit or scope of the invention. Thus, the present invention is not intended to be limited to the embodiments shown herein but is to be accorded the widest scope consistent with the principles and novel features disclosed herein.
The invention discloses a block chain digital signature method, a device and a system based on quantum cryptography, which are applied to the digital signature process, and in the prior art, four types of block chain digital signature are adopted, namely, lattice-based digital signature, encoding-based block chain digital signature, Hash-based block chain digital signature and multivariate-based block chain digital signature: 1) the grid-based approach provides an implementation that can speed up blockchain user transactions because computations are typically simpler. However, lattice-based implementations require the storage and use of large keys and involve a large amount of ciphertext overhead. Such as e.g. lattice-based NTRU or New Hope schemes, typically require management of several thousand bits of keys. 2) The code-based McElience cryptosystem may provide fast encryption and decryption functions, which is an advantage for fast execution of blockchain transactions. However, this cryptographic system requires operations to be performed using a large matrix that stores public and private keys. 3) Hash-based cryptographic systems can provide a one-time signature mechanism based on a hash function, the principle of which is based on the collision resistance of a particular cryptographic hash function. The quantum attack can be endured through years of improvement and development. But it does not perform well in the digital signature direction, especially in the case of resource-constrained devices, which involves computationally intensive steps of key compression techniques. 4) The multivariate variable-based digital signature scheme includes a scheme based on a pseudo-random multivariate quadratic equation or on a Rainbow-like signature scheme, but since each key in a key system requires tens of thousands of bytes, a further improvement in key size is required.
Based on the above problems, in the embodiments of the present invention, the assumption of using the original cryptographic system is broken out, and the quantum cryptography is used to implement the post-quantum epoch block chain digital signature method. According to the undivided principle, the inaccurate measurement principle and the unclonable theorem of the single photon, the state of the photon can be influenced by any third-party behavior. Both sides of quantum secret communication follow the QKD protocol, and negotiate by taking a photon physical state as an information carrier to generate an absolute safe shared quantum key. On the premise of ensuring the reliable safety performance of the system, the digital signature protocol designed by the invention can realize that the digital information of a plurality of subjects is carried in the process of one-time digital signature, can reduce the occupation condition of the storage space of the system, can realize the quick execution of the digital signature, and reduces the calculation complexity and the energy consumption of the system.
The invention discloses a block chain digital signature system based on quantum cryptography, the whole architecture diagram of which is shown in figure 1, and the system creates a safe and credible network environment of a block chain in order to solve the huge threat of quantum computing technology to classical cryptography. The quantum repeater is responsible for completing long-distance transmission of shared signature information. Because the system introduces QKD for local measurement and quantum key distribution, the security of the system is guaranteed, even if an attacker owns a quantum computer in the running process of the system, the key and shared content between nodes cannot be cracked or overheard, and the system adopts two channels for transmission, namely a classical channel and a quantum channel. The classical channel is also a channel used by a conventional block chain network, and does not need special processing, and for a quantum channel, because attenuation exists in quantum transmission, the invention uses a quantum repeater for the quantum channel between remote nodes.
The system comprises: the whole digital signature process comprises three main modules, namely a signature generation module, a signature information transmission module and a signature information verification module.
The signature generation module is implemented as shown in fig. 2, in which the sender (node i) sends the signature corresponding to each possible bit message to the receiver (node j), and also sends the digital signature to the client (node Ag), where each signature represents specific location information and bit information.
Defining: let m be the message to be signed by node i, n be the length of m, p be a prime number, L be a polynomial of a security parameter λ, L be from the Hough inequality, where [ p ]]Representing the set 0, 1,2, …, p-1, k ∈ [1, L ]]. For each l bit, l 1,2, …, n, the receiver (node j) is from [ p []
LIn the random selection of two sequences
And
as a first private key and a second private key, and then generating coherent states
And
order to
Then
Referred to as the l-th quantum signature of the message.
The sender (node i) generates two identical copies
And
through a secure quantum channel
Send to receiver (node j) while the same is transmitted over a secure quantum channel
And sending to the client (node Ag). Then node j and node Ag will
Stored in its storage space.
The schematic diagram of the execution process of the signature information delivery module is shown in fig. 3, in which the system mainly completes the delivery of messages between the sender (node i), the receiver (node j) and the client (node Ag). Sending node i signs message QCommDelegated to a delegate (node Ag) which signs the message QCommAnd the information such as the private key and the public quantum entrusting is sent to the receiver (node j), and meanwhile, the sender (node i) sends the information such as the private key and the public quantum entrusting to the receiver (node j), so that the integrity and the safety of the signed message are ensured in the whole process.
The sender (node i) is from [ p ]]
LIn which a sequence r ═ is randomly selected (r)
1,r
2,...,r
L) As public information of the message m, and then generating a coherent state ρ
kAnd
the generation method comprises the following steps:
wherein alpha is the position amplitude
Let m be m
1||m
2||...||m
n∈[p],ρ
r=(ρ
1,ρ
2,...,ρ
L),
Volume signed message QCom for messages
m=(ρ
r,ρ
m,r). Sender (node i) signs message QCom over a secure quantum channel
mSending to a delegate node Ag, while quantum delegating (m, r) and associated private key pair of the message over a classical channel
And sending the data to a receiving party (node j), wherein the private key pair comprises a first private key pair and a second private key pair, the first private key pair corresponds to the first private key, and the second private key pair corresponds to the second private key.
The execution flow of the signature information verification module is shown in fig. 4, and the module mainly completes verification of the digital signature. Firstly, a receiver (node j) authenticates a signature; secondly, verifying the signature by the consignor (node Ag), wherein if the signature passes the verification, the signature is valid; and thirdly, broadcasting the digital signature to the blockchain network by the consignor (node Ag), completing network consensus of the signature, and realizing the broadcasting of the digital signature for nodes with longer distances by an auxiliary quantum repeater method.
First, the receiver (node j) is based on
Generating a coherent state; the receiver (node j) then compares the coherent state with its stored QCom
mPerforming interference for each quantum state
Counting the number of photoelectric detection events on the signal empty port arm, if the total number is less than s
aL(s
aReferred to as an authentication threshold), then the signature authentication passes. Otherwise the receiver (node j) will reject the message m.
Trustee (node Ag) verifies whether signature is valid
Firstly, the receiving party (node j) sends the quantum entrustment (m, r) of the message to the entrusting party (node Ag) through the classical channel, the entrusting party (node Ag) generates the coherent state according to the quantum entrustment (m, r), and then the coherent state and QCom are carried out
mInterference is carried out, the number of photoelectric detection events on the signal empty port arm is counted finally, and if the total number is not less than 2s
vL (Preset first quantity threshold)(s)
vIs the authentication threshold), the client (node Ag) considers that the message sent by the receiver (node j) is not the message sent by the sender (node i). If less than 2s
vL, the client (node Ag) will further verify, and the receiver (node j) needs to use the private key pair through the classical channel
Sending the signature to a client (node Ag), wherein the private key pair comprises a first private key pair and a second private key pair, and the client (node Ag) performs the same signature verification with a receiver (node j) aiming at the first private key pair and the second private key pair, wherein s is more than 0
a<s
vIf the total number of photoelectric detection events is less than s
vL (preset second number threshold), the verification passes. Otherwise, the message m will be rejected.
Further, the consignor (node Ag) initiates network consensus, and the specific processing procedure is as follows: and the consignor (node Ag) sends the quantum consignment (m, r) of the message to all nodes in the block chain network through the classical channel, the block chain network nodes calculate the contract operation result of the message according to the (m, r), the consignor (node Ag) compares the operation results returned by all the nodes, and if the consensus results of all the nodes are consistent, the message is written into the block chain, namely the consensus of the digital signature is completed.
Based on the foregoing block chain digital signature system based on quantum cryptography, in an embodiment of the present invention, there is also provided a block chain digital signature method based on quantum cryptography, where the method is applied to a principal, the principal is generated based on an election mechanism, the principal is equivalent to an administrator node in a block chain network, and an execution flow of the method is shown in fig. 5, and includes the steps of:
s101, receiving a quantum signature and signature information sent by a sender;
in the embodiment of the present invention, the principal (node Ag) receives the quantum signature and the signature information sent by the sender, and the receiver (node j) verifies the quantum signature, and the specific verification process is the same as the verification process described in the signature system, which is not described herein again.
S102, receiving a quantum entrustment sent by a receiver under the condition that the receiver passes the quantum signature verification;
in the embodiment of the present invention, when the receiver (node j) verifies the quantum signature, the receiver (node j) sends a quantum delegation to receive the quantum delegation.
S103, verifying the signature information based on the quantum entrustment;
in the embodiment of the present invention, the process of verifying the signature information based on the quantum delegation is the same as the verification process described in the signature system, and details are not described here.
And S104, receiving a private key pair sent by a receiver under the condition of passing the verification, and verifying the quantum signature based on the private key pair.
In the embodiment of the invention, under the condition that the consignor (node Ag) passes the verification of the signature information, the receiver (node j) sends a private key pair, receives the private key pair, and verifies the quantum signature based on the private key pair. The process of verifying the quantum signature is the same as the verification process described in the signature system, and is not described herein again.
The invention discloses a block chain digital signature method based on quantum cryptography, which is applied to a trustee in a block chain, wherein the trustee generates based on an election mechanism, and the method comprises the following steps: receiving a quantum signature and signature information sent by a sender; under the condition that the receiver passes the verification of the quantum signature, receiving a quantum entrustment sent by the receiver; verifying the signature information based on the quantum delegation; and under the condition of passing the verification, receiving a private key pair sent by a receiver, and verifying the quantum signature based on the private key pair. In the process, the quantum signature, the quantum entrusting and the private key pair are constructed based on the quantum key technology, the entrusting party is selected based on the election mechanism, the quantum signature is verified by adopting the quantum key technology in the entrusting party, the entrusting party determined based on the election mechanism can fully ensure the fairness of the entrusting party in message verification, and the security can be ensured without a complex key due to the high safety of the quantum key, so the signature efficiency is improved.
Based on the above block chain digital signature system based on the quantum cryptography, in the embodiment of the present invention, there is also provided a block chain digital signature method based on the quantum cryptography, where the method is applied to a sender in a block chain, and an execution flow of the method is shown in fig. 6, and includes the steps of:
s201, generating a quantum signature and a private key corresponding to the message, and sending the quantum signature to a receiving party and a consignor;
in the embodiment of the present invention, the generation process of the private key is the same as the processing process in the signature system, and details are not described here.
S202, after the sending is completed, quantum entrusting is determined, a signature message is determined based on the quantum entrusting and the message, the signature message is sent to the entrusting party, and a private key pair corresponding to the private key and the quantum entrusting are sent to the receiving party.
In the embodiment of the present invention, the specific process for determining the signature message is the same as the process described in the signature system, and is not described herein again.
Based on the above block chain digital signature system based on the quantum cryptography, in the embodiment of the present invention, there is also provided a block chain digital signature method based on the quantum cryptography, where the method is applied to a receiver in a block chain, and an execution flow of the method is shown in fig. 7, and includes the steps of:
s301, receiving a quantum signature, a private key pair and a quantum entrustment sent by a sender;
s302, verifying the quantum signature based on the private key pair, and sending the quantum entrusted to an entrustor under the condition that the verification is passed;
in the embodiment of the present invention, the process of verifying the quantum signature based on the private key pair is the same as the verification process in the signature system, and details are not repeated here.
And S303, under the condition that the verification passing instruction sent by the consignor is received, sending the private key pair to the consignor.
Based on the above-mentioned block chain digital signature method based on quantum cryptography, applied to a principal in a block chain, the embodiment of the present invention discloses a block chain digital signature device based on quantum cryptography, applied to a principal in a block chain, where the principal is generated based on an election mechanism, and a structural block diagram of the device is shown in fig. 8, and includes:
a first receiving module 401, a second receiving module 402, an authentication module 403, and a receiving and authenticating module 404.
Wherein the content of the first and second substances,
the first receiving module 401 is configured to receive a quantum signature and signature information sent by a sender;
the second receiving module 402 is configured to receive the quantum delegation sent by the receiver when the receiver verifies the quantum signature;
the verification module 403 is configured to verify the signature information based on the quantum delegation;
the receiving and verifying module 404 is configured to receive a private key pair sent by a receiving party when verification passes, and verify the quantum signature based on the private key pair.
The invention discloses a block chain digital signature device based on quantum cryptography, which is applied to a principal in a block chain, wherein the principal is generated based on an election mechanism, and the device comprises: a receiving party and a trusting party receive the quantum signature and the signature information sent by a sending party; under the condition that the receiver passes the verification of the quantum signature, receiving a quantum entrustment sent by the receiver; the principal verifies the signature information based on the quantum delegation; and under the condition of passing the verification, receiving a private key pair sent by a receiver, and verifying the quantum signature based on the private key pair. In the process, the quantum signature, the quantum entrusting and the private key pair are constructed based on the quantum key technology, the entrusting party is selected based on the election mechanism, the quantum signature is verified by adopting the quantum key technology in the entrusting party, the entrusting party determined based on the election mechanism can fully ensure the fairness of the entrusting party in message verification, and the security can be ensured without a complex key due to the high safety of the quantum key, so the signature efficiency is improved.
Based on the above-mentioned block chain digital signature method based on quantum cryptography, applied to the sender in the block chain, the embodiment of the present invention discloses a block chain digital signature device based on quantum cryptography, applied to the sender in the block chain, the structural block diagram of the device is shown in fig. 9, and the device includes:
a generation and transmission module 501 and a determination and transmission module 502.
Wherein the content of the first and second substances,
the generating and sending module 501 is configured to generate a quantum signature and a private key corresponding to a message, and send the quantum signature to a receiving party and an entrusting party;
the determining and sending module 502 is configured to determine a quantum entrusting after the sending is completed, determine a signature message based on the quantum entrusting and the message, send the signature message to the entrusting party, and send a private key pair corresponding to the private key and the quantum entrusting to the receiving party.
Based on the foregoing block chain digital signature method based on quantum cryptography, applied to a receiver in a block chain, an embodiment of the present invention discloses a block chain digital signature apparatus based on quantum cryptography, applied to a receiver in a block chain, a block diagram of the apparatus is shown in fig. 10, and the apparatus includes:
a third receiving module 601, a verification and sending module 602 and a sending module 603.
Wherein the content of the first and second substances,
the third receiving module 601 is configured to receive a quantum signature, a private key pair, and a quantum delegate sent by a sender;
the verifying and sending module 602 is configured to verify the quantum signature based on the private key pair, and send the quantum delegation to a delegating party when the verification passes;
the sending module 603 is configured to send the private key pair to the principal when receiving the verification passing instruction sent by the principal.
It should be noted that, in the present specification, the embodiments are all described in a progressive manner, each embodiment focuses on differences from other embodiments, and the same and similar parts among the embodiments may be referred to each other. For the device-like embodiment, since it is basically similar to the method embodiment, the description is simple, and for the relevant points, reference may be made to the partial description of the method embodiment.
Finally, it should also be noted that, herein, relational terms such as first and second, and the like may be used solely to distinguish one entity or action from another entity or action without necessarily requiring or implying any actual such relationship or order between such entities or actions. Also, the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or apparatus. Without further limitation, an element defined by the phrase "comprising an … …" does not exclude the presence of other identical elements in a process, method, article, or apparatus that comprises the element.
For convenience of description, the above devices are described as being divided into various units by function, and are described separately. Of course, the functions of the units may be implemented in the same software and/or hardware or in a plurality of software and/or hardware when implementing the invention.
From the above description of the embodiments, it is clear to those skilled in the art that the present invention can be implemented by software plus necessary general hardware platform. Based on such understanding, the technical solutions of the present invention may be embodied in the form of a software product, which may be stored in a storage medium, such as ROM/RAM, magnetic disk, optical disk, etc., and includes instructions for causing a computer device (which may be a personal computer, a server, or a network device, etc.) to execute the method according to the embodiments or some parts of the embodiments.
The method, the device and the system for block chain digital signature based on quantum cryptography provided by the invention are introduced in detail, and a specific example is applied in the text to explain the principle and the implementation mode of the invention, and the description of the above embodiment is only used for helping to understand the method and the core idea of the invention; meanwhile, for a person skilled in the art, according to the idea of the present invention, there may be variations in the specific embodiments and the application scope, and in summary, the content of the present specification should not be construed as a limitation to the present invention.