CN111371564B - Digital signature and block chain transaction method and device and electronic equipment - Google Patents

Digital signature and block chain transaction method and device and electronic equipment Download PDF

Info

Publication number
CN111371564B
CN111371564B CN202010144790.6A CN202010144790A CN111371564B CN 111371564 B CN111371564 B CN 111371564B CN 202010144790 A CN202010144790 A CN 202010144790A CN 111371564 B CN111371564 B CN 111371564B
Authority
CN
China
Prior art keywords
node
transaction request
digital signature
endorsement
nodes
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN202010144790.6A
Other languages
Chinese (zh)
Other versions
CN111371564A (en
Inventor
张鹏
肖悦
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Shenzhen University
Original Assignee
Shenzhen University
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Shenzhen University filed Critical Shenzhen University
Priority to CN202010144790.6A priority Critical patent/CN111371564B/en
Publication of CN111371564A publication Critical patent/CN111371564A/en
Application granted granted Critical
Publication of CN111371564B publication Critical patent/CN111371564B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L9/00Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols
    • H04L9/32Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols including means for verifying the identity or authority of a user of the system or for message authentication, e.g. authorization, entity authentication, data integrity or data verification, non-repudiation, key authentication or verification of credentials
    • H04L9/3247Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols including means for verifying the identity or authority of a user of the system or for message authentication, e.g. authorization, entity authentication, data integrity or data verification, non-repudiation, key authentication or verification of credentials involving digital signatures
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06QINFORMATION AND COMMUNICATION TECHNOLOGY [ICT] SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES; SYSTEMS OR METHODS SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES, NOT OTHERWISE PROVIDED FOR
    • G06Q40/00Finance; Insurance; Tax strategies; Processing of corporate or income taxes
    • G06Q40/04Trading; Exchange, e.g. stocks, commodities, derivatives or currency exchange
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L9/00Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols
    • H04L9/08Key distribution or management, e.g. generation, sharing or updating, of cryptographic keys or passwords
    • H04L9/0861Generation of secret information including derivation or calculation of cryptographic keys or passwords
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L9/00Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols
    • H04L9/32Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols including means for verifying the identity or authority of a user of the system or for message authentication, e.g. authorization, entity authentication, data integrity or data verification, non-repudiation, key authentication or verification of credentials
    • H04L9/3218Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols including means for verifying the identity or authority of a user of the system or for message authentication, e.g. authorization, entity authentication, data integrity or data verification, non-repudiation, key authentication or verification of credentials using proof of knowledge, e.g. Fiat-Shamir, GQ, Schnorr, ornon-interactive zero-knowledge proofs
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L9/00Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols
    • H04L9/50Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols using hash chains, e.g. blockchains or hash trees

Abstract

The invention discloses a digital signature and block chain transaction method, a device and an electronic device, wherein the method comprises the following steps: acquiring an initial generation parameter; generating a key of the block chain node according to the initial generation parameter, wherein the key comprises a public key and a private key; aggregating the transaction request nodes in the block chain and the public keys of the corresponding endorsement nodes participating in the digital signature, wherein the transaction request nodes and the corresponding endorsement nodes form a tree structure, the transaction request nodes serve as root nodes of the tree structure, and the corresponding endorsement nodes serve as child nodes of the tree structure; when the root node receives the transaction request information, the transaction request information is transmitted to the corresponding child nodes in the tree structure from top to bottom; and obtaining digital signature response values corresponding to the transaction request node and the endorsement node in the tree structure based on a zero-knowledge proof algorithm. When the digital signature is verified, only the digital signature response value generated by the root node under the tree structure needs to be verified, so that the digital signature verification efficiency and the transaction efficiency are improved.

Description

Digital signature and block chain transaction method and device and electronic equipment
Technical Field
The invention relates to the technical field of data security, in particular to a digital signature and block chain transaction method, a digital signature and block chain transaction device and electronic equipment.
Background
The digital signature, namely a group of specific symbols or codes attached to an electronic document, is obtained by extracting key information of the document by using a mathematical method and performing mixed operation with private information of a user, can identify user information and approval of the user to the document, and can verify whether the document is falsified or forged. At present, digital signatures are applied to the fields of certificate management, transaction endorsement, transaction verification and the like in a Fabric distributed book platform, and a plurality of endorsers complete transactions after endorsement signatures are respectively carried out on the transactions, so that the authenticity of the identity of each node in the platform and the validity, reliability and unforgeability of the transaction process are ensured.
However, when the endorsement policy requires a large number of endorsers to perform the transaction endorsement, the received endorsement signatures meeting the endorsement policy need to be verified respectively, so that the verification efficiency is low, and further the transaction efficiency is influenced. Therefore, a digital signature method is urgently needed to improve the efficiency of endorsement verification and transaction.
Disclosure of Invention
Therefore, the technical problem to be solved by the present invention is to overcome the defects that the existing digital signature method has low endorsement verification efficiency and affects transaction efficiency, thereby providing a digital signature and block chain transaction method, apparatus and electronic device.
According to a first aspect, an embodiment of the present invention discloses a digital signature method, including: acquiring an initial generation parameter; generating a key of a block chain node according to the initial generation parameters, wherein the key comprises a public key and a private key; aggregating transaction request nodes in a block chain and public keys of a plurality of corresponding endorsement nodes participating in digital signature, wherein the transaction request nodes and the corresponding endorsement nodes form a tree structure, the transaction request nodes serve as root nodes of the tree structure, and the corresponding endorsement nodes serve as child nodes of the tree structure; when the root node receives the transaction request information, the transaction request information is transmitted to the corresponding child nodes in the tree structure from top to bottom; obtaining digital signature response values corresponding to transaction request nodes and endorsement nodes in a tree structure based on a zero-knowledge proof algorithm
With reference to the first aspect, in a first implementation manner of the first aspect, the obtaining, based on the zero-knowledge proof algorithm, a digital signature response value corresponding to a transaction request node and an endorsement node in a tree structure includes: verifying the identity of the root node; and when the identity of the root node meets the verification condition, generating digital signature response values corresponding to the transaction request node and the endorsement node in the tree structure.
With reference to the first embodiment of the first aspect, in the second embodiment of the first aspect, the verification conditions are represented by the following formula:
a=H 1 (g 1 ,V)
in the formula:
Figure BDA0002400357740000021
H 1 modeled as a stochastic oracle model; g is a radical of formula 1 Generating element; r is a group of integers of order q
Figure BDA0002400357740000022
Set of (2)
Figure BDA0002400357740000023
Q is a prime number of a kappa bit, and the value of kappa is determined according to the security parameters;
Figure BDA0002400357740000024
b=H 2 (y),d=r*a-b*sk,
Figure BDA0002400357740000025
is the public key of the root node, sk is the private key of the root node, H 2 Is a target one-way hash function.
With reference to the first aspect, in a third implementation manner of the first aspect, after obtaining the digital signature response values corresponding to the transaction request node and the endorsement node in the tree structure based on the zero-knowledge proof algorithm, the method further includes: verifying the digital signature response values corresponding to the transaction request node and the endorsement node in the obtained tree structure; and when the verification result does not meet the signature verification condition, the characterization digital signature response value is invalid.
With reference to the third implementation manner of the first aspect, in a fourth implementation manner of the first aspect, the signature verification condition is as follows:
Figure BDA0002400357740000031
in the formula:
Figure BDA0002400357740000032
H 0 is modeled as a random predictive model and,
Figure BDA0002400357740000033
transaction request node S obtained based on zero-knowledge proof algorithm i The final commitment value of the corresponding endorsement node;
Figure BDA0002400357740000034
requesting a node S for any transaction i And corresponding public key set of all endorsement nodesAggregated public key of PK, public key PK of all endorsement nodes participating in signature in PK i =(y i ,(a i ,d i )),(a i ,d i ) Requesting the node S for any transaction i The proof of possession of the private key of (a),
Figure BDA0002400357740000035
H 1 modeled as a stochastic oracle model; g 1 To generate a primitive; r is a group of integers of order q
Figure BDA0002400357740000036
Set of (2)
Figure BDA0002400357740000037
Q is a prime number of a kappa bit, and the value of kappa is determined according to the security parameters; d = r a-b sk, b = H 2 (y),
Figure BDA0002400357740000038
Is the public key of the root node, sk is the private key of the root node, H 2 A target one-way hash function;
Figure BDA0002400357740000039
s is a final response value obtained based on a zero-knowledge proof algorithm, and e = H 3 (m),H 3 And m is the transaction request information.
In combination with the second aspect, an embodiment of the present invention discloses a blockchain transaction method, including: when transaction request information of a transaction request node is received, obtaining an endorsement node corresponding to the transaction request node according to an endorsement strategy corresponding to the transaction request node; performing a digital signature operation on the transaction request information based on the digital signature method of the first aspect or any embodiment of the first aspect; and when the digital signature result meets the endorsement policy, packaging the transaction request information and the digital signature result, and sending the packaged transaction request information and the digital signature result to a sequencing node for carrying out uplink operation on the transaction information.
According to a third aspect, an embodiment of the present invention discloses a digital signature apparatus, including: the first acquisition module is used for acquiring initial generation parameters; a generating module, configured to generate a key of a blockchain node according to the initial generation parameter, where the key includes a public key and a private key; the system comprises an aggregation module, a data processing module and a data transmission module, wherein the aggregation module is used for aggregating a transaction request node in a block chain and public keys of a plurality of corresponding endorsement nodes participating in digital signature, the transaction request node and the corresponding endorsement nodes form a tree structure, the transaction request node is used as a root node of the tree structure, and the corresponding endorsement nodes are used as child nodes of the tree structure; the propagation module is used for propagating the transaction request information to the corresponding child nodes in the tree structure from top to bottom when the root node receives the transaction request information; and the second acquisition module is used for acquiring digital signature response values corresponding to the transaction request node and the endorsement node in the tree structure based on a zero-knowledge proof algorithm.
According to a fourth aspect, an embodiment of the present invention discloses a blockchain transaction apparatus, including: the acquiring module is used for acquiring an endorsement node corresponding to a transaction request node according to an endorsement strategy corresponding to the transaction request node when transaction request information of the transaction request node is received; a signature operation module, configured to perform a digital signature operation on the transaction request information based on the digital signature method described in the first aspect or any implementation manner of the first aspect; and the uplink operation module is used for packaging the transaction request information and the digital signature result and then sending the packaged transaction request information and the packaged digital signature result to the sequencing node for uplink operation of the transaction information when the digital signature result meets the endorsement policy.
According to a fifth aspect, an embodiment of the present invention discloses an electronic device, including: a processor, a memory and a computer program stored on the memory and operable on the processor, the processor implementing the steps of the digital signature method according to any one of the embodiments of the first aspect and the first aspect or the steps of the block chain transaction method according to the second aspect when executing the program.
According to a sixth aspect, the present invention discloses a readable computer storage medium, on which computer instructions are stored, which when executed by a processor implement the steps of the digital signature method described in any one of the first aspect and the first aspect, or the steps of the blockchain transaction method described in the second aspect.
The technical scheme provided by the embodiment of the invention has the following advantages:
the digital signature method provided by the embodiment of the invention comprises the steps of obtaining initial generation parameters, generating a public key and a private key of a block link point according to the initial generation parameters, aggregating a transaction request node in a block chain and public keys of a plurality of corresponding endorsement nodes participating in digital signature, wherein the transaction request node and the corresponding endorsement nodes form a tree structure, the transaction request node is used as a root node of the tree structure, the corresponding endorsement nodes are used as sub-nodes of the tree structure, when the root node receives transaction request information, the transaction request information is transmitted to the corresponding sub-nodes in the tree structure from top to bottom, and digital signature response values corresponding to the transaction request node and the endorsement nodes in the tree structure are obtained based on a zero-knowledge proof algorithm.
Drawings
In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings used in the embodiments or the prior art descriptions will be briefly described below, and it is obvious that the drawings in the following description are some embodiments of the present invention, and other drawings can be obtained by those skilled in the art without creative efforts.
Fig. 1 is a flowchart of a digital signature method according to an embodiment of the present invention;
fig. 2 is a flowchart of a blockchain transaction method according to an embodiment of the present invention;
fig. 3 is a block diagram of a digital signature apparatus according to an embodiment of the present invention;
fig. 4 is a block diagram of a blockchain transaction device according to an embodiment of the present invention;
fig. 5 is a schematic structural diagram of an electronic device according to an embodiment of the present invention.
Detailed Description
The technical solutions of the present invention will be described clearly and completely with reference to the accompanying drawings, and it should be understood that the described embodiments are some, but not all embodiments of the present invention. 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.
Furthermore, the terms "first," "second," and "third" are used for descriptive purposes only and are not to be construed as indicating or implying relative importance.
In the description of the present invention, it should be noted that, unless otherwise explicitly specified or limited, the terms "mounted," "connected," and "connected" are to be construed broadly and may be, for example, fixedly connected, detachably connected, or integrally connected; can be mechanically or electrically connected; the two elements may be directly connected or indirectly connected through an intermediate medium, or may be communicated with each other inside the two elements, or may be wirelessly connected or wired connected. The specific meanings of the above terms in the present invention can be understood in specific cases to those skilled in the art.
In addition, the technical features involved in the different embodiments of the present invention described below may be combined with each other as long as they do not conflict with each other.
An embodiment of the present application provides a digital signature method, as shown in fig. 1, the digital signature method includes:
step 101, acquiring initial generation parameters;
illustratively, the initial generation parameter may be an order q and a generator g 1 Group (2)
Figure BDA0002400357740000071
To obtain
Figure BDA0002400357740000072
The value of k may be determined according to a security parameter, and the size of the security parameter may be determined according to the size of the memory space of the processor and the level of the security level of the blockchain transaction. In the embodiment of the present application, 160 bits are taken as an example, q is a prime number of 160 bits, and when g 1 When is 2, get the group
Figure BDA0002400357740000073
Is 2 160 In the embodiment of the present application, the generator g is generated 1 The size of (c) is not limited.
102, generating a key of a block chain node according to the initial generation parameter, wherein the key comprises a public key and a private key;
illustratively, the parameters are generated based on the initial
Figure BDA0002400357740000074
The way to generate the keys for blockchain nodes may be at [0, q-1 ]]Randomly selecting sk E [0, q-1 ] from the Chinese characters]As a private key and will
Figure BDA0002400357740000081
As the public key corresponding to sk, in
Figure BDA0002400357740000082
In the method, r is randomly selected from the group,
Figure BDA0002400357740000083
is a group of integers of order q
Figure BDA0002400357740000084
Set of (2), calculating
Figure BDA0002400357740000085
b=H 2 (y) and d = r a-b sk, wherein four hash functions are predefined: h 0 ,H 1 ,H 2 ,
Figure BDA0002400357740000086
Four hash functions H 0 ,H 1 And H 2 ,H 3 Mapping 0, 1 bits of different lengths to integer group set of order q
Figure BDA0002400357740000087
Of (b), wherein H 0 ,H 1 Is modeled as a stochastic prophetic model, H 2 ,H 3 Is defined as the target one-way hash function, H 0 And H 3 For multiple signature verification, H 1 And H 2 For authentication, H 0 And H 1 The random predictive model is modeled as a random predictive model, the identity and multiple signatures are verified by using the random predictive model, and because the hash function of the random predictive model is used for one input, the output hash value of the input hash function is completely randomly and uniformly distributed, so that the safety of a verification result is improved, but the random predictive model has strong hypothesis, and H is represented by 2 And H 3 The target one-way hash function is set, and because the input and the output of the target one-way hash function have a certain incidence relation, the dependence on a random language model in the processes of identity verification and multi-signature verification is reduced, and the safety of the digital signature is further improved. Let pi = (a, d) be proof of possession of the private key sk to prevent attacks on the private key by malicious public keys, define pk = (y, pi) and output (pk, sk).
103, aggregating the transaction request nodes in the block chain and the public keys of the corresponding endorsement nodes participating in the digital signature, wherein the transaction request nodes and the corresponding endorsement nodes form a tree structure, the transaction request nodes serve as root nodes of the tree structure, and the corresponding endorsement nodes serve as child nodes of the tree structure;
illustratively, public keys of a transaction request node and a plurality of corresponding endorsement nodes participating in digital signature in a block chain are added to obtain a public key set PK, and all signer public keys PK involved in multi-signature in the PK are analyzed i =(y i ,(a i ,d i ) Output) of the system
Figure BDA0002400357740000091
Wherein Π is the polymerization operation.
104, when the root node receives the transaction request information, transmitting the transaction request information to the corresponding child nodes in the tree structure from top to bottom;
illustratively, since the plurality of endorsement nodes that endorse the transaction request node and the transaction request node are constructed in advance as a tree structure, when the root node receives the transaction request information, the transaction request information is propagated to the corresponding child nodes in the tree structure from top to bottom from the root node.
And 105, obtaining digital signature response values corresponding to the transaction request node and the endorsement node in the tree structure based on a zero-knowledge proof algorithm.
Illustratively, define C i For signers S in a tree structure i Set of child nodes of, P i Is the signer S i Parent node of (2), input initial generation parameter par, signer S i Private key sk i The message m and the tree structure T obtain digital signature response values Sign (par, sk) corresponding to the transaction request node and the endorsement node in the tree structure based on a zero-knowledge proof algorithm i M, T) can be implemented by the following four-stage algorithm:
stage 1: a declaration phase. When the root node S 0 When a transaction request message m is received, it begins to propagate the message m in the tree structure to its children from top to bottom.
And (2) stage: a commitment stage. Before waiting for message m in the declaration phase, each node S in the tree structure i : 1) Randomly selecting a secret value v i
Figure BDA0002400357740000092
I.e. a set of integers of order q
Figure BDA0002400357740000093
Optionally selected, and calculated
Figure BDA0002400357740000094
2) Wait for the commitment values of all its child nodes j
Figure BDA0002400357740000095
If the node S i Without child nodes, the commitment value is computed in the same way as the secret value, i.e.
Figure BDA0002400357740000096
Otherwise, after receiving all the commitment values, all the child nodes are connected
Figure BDA0002400357740000101
Carry out successive multiplications, i.e.
Figure BDA0002400357740000102
Obtaining a commitment value
Figure BDA0002400357740000103
If node S i Not the root node S 0 Then send
Figure BDA0002400357740000104
To parent node P i
And (3) stage: and (5) a challenge stage. Root node S 0 Wait for the commitment values of all its child nodes j
Figure BDA0002400357740000105
And calculating a final commitment value
Figure BDA0002400357740000106
Thus the root node S 0 Can obtain a common challenge value
Figure BDA0002400357740000107
And sends it from top to bottom to all children.
And (4) stage: and a response phase. When node S i After receiving c, 1) calculating s i =v i *c-e*sk i In which
Figure BDA0002400357740000108
e=H 3 (m); 2) Wait for the response values of all its child nodes j
Figure BDA0002400357740000109
If the node S i No child node, calculation mode and calculation of response value i In the same way, i.e.
Figure BDA00024003577400001010
Otherwise, after receiving all response values, all child nodes of the node are processed
Figure BDA00024003577400001011
Are added in succession, i.e.
Figure BDA00024003577400001012
And obtaining a response value. If node S i Not the root node S 0 Then send
Figure BDA00024003577400001013
To the parent node P i . Finally, the root node S 0 Calculating a final response
Figure BDA00024003577400001014
And outputs a digital signature response value δ = (c, S) for a plurality of child nodes.
In the embodiment of the application, the digital signature response values corresponding to the transaction request nodes and the endorsement nodes in the tree structure are obtained through a zero-knowledge proof algorithm, the security of transaction information is ensured, and meanwhile, the digital signature response values obtained based on the tree structure are correlated with each other, and the change of the information of any node can be found, so that based on the information correlation characteristics in the tree structure, the root node only needs to verify whether the received digital signature response values meet the endorsement strategy, the endorsement verification efficiency is improved, and the transaction efficiency is further improved.
As an alternative embodiment of the present application, step 105 includes: verifying the identity of the root node; and when the identity of the root node meets the verification condition, generating digital signature response values corresponding to the transaction request node and the endorsement node in the tree structure.
Exemplarily, after the child nodes in the tree structure receive the transaction request information, the identity of the root node corresponding to the transaction request information needs to be verified, so as to ensure the security of the transaction. The identity verification method for the root node may be to verify a public key of the root node, and the verification method for the public key may be to obtain initial generation parameters par and pk = (y, pi), where pi = (a, d) according to b = H 2 (y) and
Figure BDA0002400357740000111
the verification condition may be verifying equation a = H 1 (g 1 V) is true, the verification equation can be obtained by:
Figure BDA0002400357740000112
in the process of calculating the equation, the public key y and the parameters in the proof of possession pi = (a, d) of the corresponding private key sk are used for formula derivation, so that the equation can be directly used to complete the identity verification of the root node, malicious public key attacks in multiple signatures are avoided, and the block chain transaction security and the transaction efficiency are improved. If the equation is not satisfied, the public key pk is invalid, the public key is discarded, if the public key is valid, the identity of the root node which sends the transaction request information is verified, the digital signature operation is carried out on the transaction request information which is sent by the root node with successful identity verification, and digital signature response values corresponding to the transaction request node and the endorsement node in the tree structure are generated.
As an alternative embodiment of the present application, after step 105, the method further includes: verifying the digital signature response values corresponding to the transaction request node and the endorsement node in the obtained tree structure; and when the verification result does not meet the signature verification condition, the characterization digital signature response value is invalid.
Illustratively, an initial generation parameter par is obtained, and a public key is aggregated
Figure BDA0002400357740000121
Message m and digital signature response value δ = (c, S), according to e = H 3 (m) and
Figure BDA0002400357740000122
the signature verification condition may be a verification equation
Figure BDA0002400357740000123
If this is true, the verification equation can be derived as follows:
Figure BDA0002400357740000124
in the derivation of the verification equation, the aggregated public key of all signer public keys related to multiple signatures in the public key set PK is used
Figure BDA0002400357740000125
The derivation is carried out, so that the equation can be directly used, the verification of the digital signature response values of a plurality of endorsement nodes can be completed at one time, and the block chain verification efficiency is improved. If the equation is not valid, the digitally signed response value δ is invalid, otherwise, the signature δ is valid and the digitally signed response value is verified.
An embodiment of the present application further provides a blockchain transaction method, as shown in fig. 2, the method includes:
step 201, when transaction request information of a transaction request node is received, obtaining an endorsement node corresponding to the transaction request node according to an endorsement strategy corresponding to the transaction request node;
illustratively, the endorsement policy corresponding to the transaction request node may be deployed in advance in a transaction platform based on a block chain in an intelligent contract manner, and when the transaction request node needs to initiate transaction request information, the transaction request node obtains the endorsement policy corresponding to the transaction request node on the type of transaction according to the presetting on the intelligent contract, and then determines that the transaction request node needs the corresponding endorsement node. In order to ensure the safety of the transaction platform based on the blockchain, before any node joins the transaction platform based on the blockchain, the identity of each node is verified, and the node which is allowed to be authenticated is joined to the transaction platform. The method for verifying the node identity in the embodiment of the present application may adopt the method for verifying the root node identity in the previous embodiment, and details are not described herein.
Step 202, based on the digital signature method described in the previous embodiment, a digital signature operation is performed on the transaction request information. For a detailed description, reference is made to the above embodiment, which is not repeated herein.
And step 203, when the digital signature result meets the endorsement policy, packaging the transaction request information and the digital signature result, and sending the packaged transaction request information and digital signature result to a sequencing node for uplink transaction information.
Illustratively, the transaction platform based on the blockchain takes a Fabric platform as an example, the transaction request node is Cl, and the endorsement node is En i Ordering node is Or, defining C i Is an endorsement node En i Set of child nodes of, P i Is an endorsement node En i N is the number of endorsers required by the endorsement policy. The Fabric transaction platform uses the digital signature method of the previous embodiment to implement digital signature and verification of transaction request information sent by a transaction request node.
Specifically, the manner of digitally signing the transaction request information sent by the transaction request node may be: all endorsement nodes En assigned according to endorsement policy i (i =1, \ 8230;, N) works in a subgroup of a tree structure. Each endorsement node can first execute the algorithm in stage 2 corresponding to the previous embodiment and the transaction request node Cl as the root node executes the algorithm in stage 3 corresponding to the previous embodiment, thereby generating a common challenge value c, c as part of the multi-signature, which is sent to each endorsement node.
When the transaction request node Cl requests a transaction m, the transaction request node Cl is used as a root node to execute the algorithm in the stage 1 corresponding to the previous embodiment, and the transaction m is sent to each endorsement section from top to bottomPoint En i (i =1, \8230;, N). When endorsement node En i After receiving the proposal from the transaction request node, checking the validity of the client Cl identity, performing transaction simulation to obtain a simulated transaction result, executing the algorithm in the stage 4 corresponding to the previous embodiment, and calculating the response value s of the digital signature of each endorsement node i
Endorsement node En i Continuing to execute the algorithm in stage 4 corresponding to the previous embodiment, all endorsement nodes En i (i =1, \8230;, N) sending back a proposal response from bottom to top, which may include simulated transaction results and an intermediate computed digitally signed response value
Figure BDA0002400357740000141
The transaction request node Cl only needs to check the simulated transaction result and collect all the digital signature response values calculated from its child endorsement node j
Figure BDA0002400357740000142
Computing
Figure BDA0002400357740000143
Thereby generating a representative transaction request node Cl and all assigned endorsement nodes En i (i =1, \8230;, N) corresponding digitally signed response value (c, S), which multi-signature can be quickly verified by all nodes, including the transaction request node Cl, to check if the endorsement policy is satisfied. If the multiple signatures are valid, the transaction request node Cl packages the final transaction proposal and transaction response and sends the final transaction proposal and transaction response to the sequencing node Or together, the sequencing node Or collects the transaction requests from different transaction request nodes, sequences the transactions into blocks according to the configuration, and broadcasts the block information to the whole network. All nodes on the network verify the validity of the transaction information in the block by using the digital signature response value verification method in the previous embodiment, and synchronously update the account book, thereby realizing the uplink operation of the transaction information.
According to the block chain transaction method provided by the embodiment of the application, when transaction request information of a transaction request node is received, an endorsement node corresponding to the transaction request node is obtained according to an endorsement strategy corresponding to the transaction request node, digital signature operation is performed on the transaction request information based on the digital signature method recorded in the previous embodiment, when the digital signature result meets the endorsement strategy, the transaction request information and the digital signature result are packaged and then sent to a sequencing node for transaction information uplink operation, the whole transaction process only needs to verify a digital signature response value generated by a root node under a tree structure, and the digital signature verification efficiency and the transaction efficiency based on a block chain transaction platform are improved.
An embodiment of the present application further provides a digital signature apparatus, as shown in fig. 3, including:
a first obtaining module 301, configured to obtain an initial generation parameter;
a generating module 302, configured to generate a key of a blockchain node according to the initial generation parameter, where the key includes a public key and a private key;
the aggregation module 303 is configured to aggregate a transaction request node in a block chain and public keys of a plurality of corresponding endorsement nodes participating in digital signature, where the transaction request node and the corresponding endorsement nodes form a tree structure, the transaction request node is a root node of the tree structure, and the corresponding endorsement nodes are child nodes of the tree structure;
a propagation module 304, configured to propagate, when the root node receives the transaction request information, the transaction request information to a corresponding child node in a tree structure from top to bottom;
and a second obtaining module 305, configured to obtain digital signature response values corresponding to the multiple child nodes based on a zero-knowledge proof algorithm.
The digital signature device provided by the embodiment of the application acquires initial generation parameters, generates a public key and a private key of a link point of a block according to the initial generation parameters, aggregates public keys of a transaction request node and a plurality of corresponding endorsement nodes participating in digital signature in the block chain, forms a tree structure with the transaction request node and the corresponding endorsement nodes, uses the transaction request node as a root node of the tree structure, uses the corresponding endorsement nodes as child nodes of the tree structure, spreads transaction request information to the corresponding child nodes in the tree structure from top to bottom when the root node receives the transaction request information, obtains digital signature response values corresponding to the transaction request node and the endorsement nodes in the tree structure based on a zero-knowledge proof algorithm, and only needs to verify a digital signature response value generated by the root node under the tree structure when the digital signature is verified, so that the digital signature verification efficiency is improved, and the transaction efficiency is further improved.
As an optional embodiment of the present application, the second obtaining module 305 is configured to verify an identity of the root node; and when the identity of the root node meets the verification condition, generating a response value of the digital signature of the child node.
As an alternative embodiment of the present application, the verification condition is as follows:
a=H 1 (g 1 ,V)
in the formula:
Figure BDA0002400357740000161
H 1 modeled as a stochastic predictive model; g 1 To generate a primitive; r is a group of integers of order q
Figure BDA0002400357740000162
Set of (2)
Figure BDA0002400357740000163
Q is a prime number of a kappa bit, and the value of kappa is determined according to the security parameters;
Figure BDA0002400357740000164
b=H 2 (y),d=r*a-b*sk,
Figure BDA0002400357740000165
is the public key of the root node, sk is the private key of the root node, H 2 Is the target one-way hash function.
As an optional embodiment of this application, the second obtaining module 305 is further configured to verify the obtained digital signature response values of the multiple child nodes; and when the verification result does not meet the signature verification condition, the characterization digital signature response value is invalid.
As an optional embodiment of the present application, the signature verification condition is as follows:
Figure BDA0002400357740000171
in the formula:
Figure BDA0002400357740000172
H 0 is modeled as a random predictive model and,
Figure BDA0002400357740000173
transaction request node S obtained based on zero-knowledge proof algorithm i The final commitment value of the corresponding endorsement node;
Figure BDA0002400357740000174
requesting the node S for any transaction i And the aggregation public key of the public key set PK of all endorsement nodes corresponding to the public key set PK, and the public keys PK of all endorsement nodes participating in signature in PK i =(y i ,(a i ,d i )),(a i ,d i ) Requesting the node S for any transaction i The proof of possession of the private key of (a),
Figure BDA0002400357740000175
H 1 modeled as a stochastic oracle model; g 1 To generate a primitive; r is a group of integers of order q
Figure BDA0002400357740000176
Set of (2)
Figure BDA0002400357740000177
Q is a prime number of a kappa bit, and the value of kappa is determined according to the security parameters; d = r a-b sk, b = H 2 (y),
Figure BDA0002400357740000178
Is the public key of the root node, sk is the private key of the root node, H 2 A target one-way hash function;
Figure BDA0002400357740000179
s is a final response value obtained based on a zero-knowledge proof algorithm, and e = H 3 (m),H 3 And m is the transaction request information.
An embodiment of the present application further provides a blockchain transaction apparatus, as shown in fig. 4, including:
the obtaining module 401 is configured to, when transaction request information of a transaction request node is received, obtain an endorsement node corresponding to the transaction request node according to an endorsement policy corresponding to the transaction request node;
a signature operation module 402, configured to perform a digital signature operation on the transaction request information based on the digital signature method according to the previous embodiment;
and a chain linking operation module 403, configured to, when the digital signature result satisfies the endorsement policy, package the transaction request information and the digital signature result, and send the packaged transaction request information and digital signature result to the sorting node to perform a chain linking operation on the transaction information.
According to the block chain transaction device provided by the embodiment of the application, when transaction request information of a transaction request node is received, an endorsement node corresponding to the transaction request node is obtained according to an endorsement strategy corresponding to the transaction request node, digital signature operation is performed on the transaction request information based on the digital signature method recorded in the previous embodiment, when the digital signature result meets the endorsement strategy, the transaction request information and the digital signature result are packaged and then sent to a sequencing node to perform uplink transaction information operation, and only a digital signature response value generated by a root node under a tree structure needs to be verified in the whole transaction process, so that the digital signature verification efficiency and the transaction efficiency based on a block chain transaction platform are improved, and meanwhile, the storage space for transaction data is saved.
An embodiment of the present application further provides an electronic device, as shown in fig. 5, the electronic device includes: the processor 501, the memory 502, and a computer program stored in the memory 502 and operable on the processor 501, when the processor 501 executes the program, implement the steps of the digital signature method described in the above embodiment, or the steps of the blockchain transaction method described in the above embodiment, where the processor 501, the memory 502, the image capturing device 503, and the voice device 504 may be connected by a bus or other means, and fig. 5 may be connected by a bus as an example.
Processor 501 may be a Central Processing Unit (CPU). The Processor 501 may also be other general purpose processors, digital Signal Processors (DSPs), application Specific Integrated Circuits (ASICs), field Programmable Gate Arrays (FPGAs) or other Programmable logic devices, discrete Gate or transistor logic devices, discrete hardware components, or any combination thereof.
The memory 502, which is a non-transitory computer-readable storage medium, may be used to store non-transitory software programs, non-transitory computer-executable programs, and modules, such as program instructions/modules corresponding to the digital signature method in the embodiments of the present invention, or program instructions/modules corresponding to the block chain transaction method in the embodiments of the present invention. The processor 501 executes the non-transitory software programs, instructions and modules stored in the memory 502 to execute various functional applications and data processing of the processor, that is, to implement the digital signature method in the above method embodiment or the block chain transaction method in the above method embodiment.
The memory 502 may include a storage program area and a storage data area, wherein the storage program area may store an operating system, an application program required for at least one function; the storage data area may store data created by the processor 501, and the like. Further, the memory 502 may include high-speed random access memory, and may also include non-transitory memory, such as at least one magnetic disk storage device, flash memory device, or other non-transitory solid state storage device. In some embodiments, memory 502 may optionally include memory located remotely from processor 501, which may be connected to processor 501 via a network. Examples of such networks include, but are not limited to, the internet, intranets, local area networks, mobile communication networks, and combinations thereof.
The one or more modules are stored in the memory 502 and, when executed by the processor 501, perform a digital signature method as in the embodiment of fig. 1, or a blockchain transaction method as in the embodiment of fig. 2.
The details of the electronic device may be understood by referring to the corresponding descriptions and effects in the embodiments shown in fig. 1 and fig. 2, which are not described herein again.
Embodiments of the present invention further provide a computer storage medium, where computer-executable instructions are stored, and the computer-executable instructions may execute the digital signature method or the block chain transaction method in any of the above method embodiments. The storage medium may be a magnetic Disk, an optical Disk, a Read-Only Memory (ROM), a Random Access Memory (RAM), a Flash Memory (Flash Memory), a Hard Disk (Hard Disk Drive, abbreviated as HDD), a Solid State Drive (SSD), or the like; the storage medium may also comprise a combination of memories of the kind described above.
It should be understood that the above examples are only for clarity of illustration and are not intended to limit the embodiments. Other variations and modifications will be apparent to persons skilled in the art in light of the above description. And are neither required nor exhaustive of all embodiments. And obvious variations or modifications therefrom are within the scope of the invention.

Claims (10)

1. A digital signature method, comprising:
acquiring an initial generation parameter;
generating a key of a block chain node according to the initial generation parameter, wherein the key comprises a public key and a private key;
aggregating transaction request nodes in a block chain and public keys of a plurality of corresponding endorsement nodes participating in digital signature, wherein the transaction request nodes and the corresponding endorsement nodes form a tree structure, the transaction request nodes are used as root nodes of the tree structure, and the corresponding endorsement nodes are used as child nodes of the tree structure;
when the root node receives the transaction request information, the transaction request information is transmitted to the corresponding child nodes in the tree structure from top to bottom;
and obtaining digital signature response values corresponding to the transaction request node and the endorsement node in the tree structure based on a zero-knowledge proof algorithm.
2. The method of claim 1, wherein obtaining the digital signature response values corresponding to the transaction request node and the endorsement node in the tree structure based on the zero-knowledge proof algorithm comprises:
verifying the identity of the root node;
and when the identity of the root node meets the verification condition, generating digital signature response values corresponding to the transaction request node and the endorsement node in the tree structure.
3. The method according to claim 2, wherein the verification condition is represented by the following formula:
a=H 1 (g 1 ,V)
in the formula:
Figure FDA0003858939950000021
H 1 modeled as a stochastic predictive model; g 1 Generating element; r is a group of integers of order q
Figure FDA0003858939950000022
Set of (2)
Figure FDA0003858939950000023
Q is a prime number of a kappa bit, and the value of kappa is determined according to the security parameters;
Figure FDA0003858939950000024
b=H 2 (y),d=r*a-b*sk,
Figure FDA0003858939950000025
is the public key of the root node, sk is the private key of the root node, H 2 Is a target one-way hash function.
4. The method of claim 1, wherein after obtaining the digital signature response values corresponding to the transaction request node and the endorsement node in the tree structure based on the zero-knowledge proof algorithm, the method further comprises:
verifying the digital signature response values corresponding to the transaction request node and the endorsement node in the obtained tree structure;
and when the verification result does not meet the signature verification condition, the characterization digital signature response value is invalid.
5. The method of claim 4, wherein the signature verification condition is as follows:
Figure FDA0003858939950000026
in the formula:
Figure FDA0003858939950000027
H 0 is modeled as a random predictive model and,
Figure FDA0003858939950000028
for transaction request nodes S based on zero knowledge proof algorithm i The final commitment value of the corresponding endorsement node;
Figure FDA0003858939950000031
Figure FDA0003858939950000032
requesting a node S for any transaction i And the aggregation public key of the public key set PK of all endorsement nodes corresponding to the public key set PK, and the public keys PK of all endorsement nodes participating in signature in PK i =(y i ,(a i ,d i )),(a i ,d i ) Requesting a node S for any transaction i The proof of possession of the private key of (a),
Figure FDA0003858939950000033
H 1 modeled as a stochastic predictive model; g is a radical of formula 1 To generate a primitive; r is a group of integers of order q
Figure FDA0003858939950000034
Set of (2)
Figure FDA0003858939950000035
Q is a prime number of a kappa bit, and the value of kappa is determined according to the security parameters; d = r a-b sk, b = H 2 (y),
Figure FDA0003858939950000036
Is the public key of the root node, sk is the private key of the root node, H 2 A target one-way hash function;
Figure FDA0003858939950000037
s is a final response value obtained based on a zero-knowledge proof algorithm, and e = H 3 (m),H 3 Is a target one-way hash function, m is transaction request information, y i Is the public key corresponding to the root node i.
6. A blockchain transaction method, comprising:
when transaction request information of a transaction request node is received, obtaining an endorsement node corresponding to the transaction request node according to an endorsement strategy corresponding to the transaction request node;
performing a digital signature operation on the transaction request information based on the digital signature method according to any one of claims 1 to 5;
and when the digital signature result meets the endorsement policy, packaging the transaction request information and the digital signature result, and sending the packaged transaction request information and the digital signature result to a sequencing node for carrying out uplink operation on the transaction information.
7. A digital signature apparatus, comprising:
the first acquisition module is used for acquiring initial generation parameters;
a generating module, configured to generate a key of a blockchain node according to the initial generation parameter, where the key includes a public key and a private key;
the system comprises an aggregation module, a data processing module and a data processing module, wherein the aggregation module is used for aggregating a transaction request node in a block chain and public keys of a plurality of corresponding endorsement nodes participating in digital signature, the transaction request node and the corresponding endorsement nodes form a tree structure, the transaction request node is used as a root node of the tree structure, and the corresponding endorsement nodes are used as child nodes of the tree structure;
the propagation module is used for propagating the transaction request information to the corresponding child nodes in the tree structure from top to bottom when the root node receives the transaction request information;
and the second acquisition module is used for acquiring digital signature response values corresponding to the transaction request node and the endorsement node in the tree structure based on a zero-knowledge proof algorithm.
8. A blockchain transaction apparatus, comprising:
the acquiring module is used for acquiring an endorsement node corresponding to a transaction request node according to an endorsement strategy corresponding to the transaction request node when transaction request information of the transaction request node is received;
a signature operation module, configured to perform a digital signature operation on the transaction request information based on the digital signature method according to any one of claims 1 to 5;
and the uplink operation module is used for packaging the transaction request information and the digital signature result and then sending the packaged transaction request information and digital signature result to the sequencing node for uplink operation of the transaction information when the digital signature result meets the endorsement policy.
9. An electronic device, comprising:
a processor, a memory and a computer program stored on the memory and executable on the processor, the processor implementing the steps of the digital signature method of any one of claims 1 to 5 or the steps of the blockchain transaction method of claim 6 when executing the program.
10. A readable computer storage medium having stored thereon computer instructions, characterized in that the instructions, when executed by a processor, carry out the steps of the digital signature method of any one of claims 1 to 5 or the steps of the blockchain transaction method of claim 6.
CN202010144790.6A 2020-03-04 2020-03-04 Digital signature and block chain transaction method and device and electronic equipment Active CN111371564B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202010144790.6A CN111371564B (en) 2020-03-04 2020-03-04 Digital signature and block chain transaction method and device and electronic equipment

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202010144790.6A CN111371564B (en) 2020-03-04 2020-03-04 Digital signature and block chain transaction method and device and electronic equipment

Publications (2)

Publication Number Publication Date
CN111371564A CN111371564A (en) 2020-07-03
CN111371564B true CN111371564B (en) 2023-02-03

Family

ID=71208571

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202010144790.6A Active CN111371564B (en) 2020-03-04 2020-03-04 Digital signature and block chain transaction method and device and electronic equipment

Country Status (1)

Country Link
CN (1) CN111371564B (en)

Families Citing this family (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112187454B (en) * 2020-09-14 2022-12-02 国网浙江省电力有限公司 Key management method and system based on block chain
CN113783696A (en) * 2021-08-14 2021-12-10 西安电子科技大学 Internet of things perception data sharing transaction platform, control method, equipment and terminal
CN113556237B (en) * 2021-09-17 2021-12-17 杭州链网科技有限公司 Threshold signature method, system, device and storage medium based on aggregation of multiple signatures
CN114386974B (en) * 2021-11-24 2022-10-28 弥达斯科技(深圳)有限公司 Transaction method, device, system and storage medium based on zero knowledge certification
CN114092101B (en) * 2022-01-21 2022-04-08 深圳市一航网络信息技术有限公司 Transaction verification method and device, storage medium and electronic equipment
CN117499039B (en) * 2023-10-09 2024-03-26 贵州大学 Blockchain signature method based on elliptic curve public key cryptographic algorithm

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2019091289A1 (en) * 2017-11-10 2019-05-16 腾讯科技(深圳)有限公司 Method for generating signature, electronic device, and storage medium
CN109858270A (en) * 2019-02-22 2019-06-07 江苏金智教育信息股份有限公司 A kind of construction method and system of decentralization digital identity
WO2020002009A1 (en) * 2018-06-28 2020-01-02 International Business Machines Corporation Delegating credentials with a blockchain member service

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US8874921B2 (en) * 2011-06-20 2014-10-28 Guardtime IP Holdings, Ltd. System and method for generating keyless digital multi-signatures

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2019091289A1 (en) * 2017-11-10 2019-05-16 腾讯科技(深圳)有限公司 Method for generating signature, electronic device, and storage medium
WO2020002009A1 (en) * 2018-06-28 2020-01-02 International Business Machines Corporation Delegating credentials with a blockchain member service
CN109858270A (en) * 2019-02-22 2019-06-07 江苏金智教育信息股份有限公司 A kind of construction method and system of decentralization digital identity

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
王嵩.面向数字身份管理系统的多因素身份验证方法研究.《信息科技辑》.2019, *

Also Published As

Publication number Publication date
CN111371564A (en) 2020-07-03

Similar Documents

Publication Publication Date Title
CN111371564B (en) Digital signature and block chain transaction method and device and electronic equipment
Ambrosin et al. SANA: Secure and scalable aggregate network attestation
CN109889497B (en) Distrust-removing data integrity verification method
JP5790319B2 (en) Signature verification apparatus, signature verification method, program, and recording medium
JP5593850B2 (en) Authentication device, authentication method, program, and signature generation device
JP6069852B2 (en) Information processing apparatus, information processing method, and program
CN109861828B (en) Node access and node authentication method based on edge calculation
KR20140054151A (en) Credential validation
CN111597590B (en) Block chain-based data integrity quick inspection method
WO2012115671A1 (en) Digital signatures
EP2947840A1 (en) Certificateless multi-agent signature method and apparatus
CN110505067B (en) Block chain processing method, device, equipment and readable storage medium
CN105515778B (en) Cloud storage data integrity services signatures method
US20160149708A1 (en) Electronic signature system
CN109766716A (en) A kind of anonymous bidirectional authentication method based on trust computing
CN109618348A (en) A kind of implementation method that unidirectional proxy is signed again and device
CN111245626B (en) Zero knowledge proving method, device and storage medium
CN112989436A (en) Multi-signature method based on block chain platform
CN109981288B (en) Fine-grained cloud server side rapid external certification method based on aggregated signature
JP4772965B2 (en) Method for proving entity authenticity and / or message integrity
CN114362962B (en) Block chain workload evidence generation method
CN113112269B (en) Multiple signature method, computer device, and storage medium
KR101238846B1 (en) System and method for verifying certificate
CN116488816A (en) Data processing method, device and storage medium based on blockchain network
CN107947944A (en) A kind of increment endorsement method based on lattice

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant