CN115021944B - Consensus method and device based on aggregate signature and space-time certification algorithm - Google Patents

Consensus method and device based on aggregate signature and space-time certification algorithm Download PDF

Info

Publication number
CN115021944B
CN115021944B CN202210940999.2A CN202210940999A CN115021944B CN 115021944 B CN115021944 B CN 115021944B CN 202210940999 A CN202210940999 A CN 202210940999A CN 115021944 B CN115021944 B CN 115021944B
Authority
CN
China
Prior art keywords
algorithm
signature
transaction
space
verification
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
CN202210940999.2A
Other languages
Chinese (zh)
Other versions
CN115021944A (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 Graduate School Harbin Institute of Technology
Original Assignee
Shenzhen Graduate School Harbin Institute of Technology
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 Graduate School Harbin Institute of Technology filed Critical Shenzhen Graduate School Harbin Institute of Technology
Priority to CN202210940999.2A priority Critical patent/CN115021944B/en
Publication of CN115021944A publication Critical patent/CN115021944A/en
Application granted granted Critical
Publication of CN115021944B publication Critical patent/CN115021944B/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
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/20Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
    • G06F16/27Replication, distribution or synchronisation of data between databases or within a distributed database system; Distributed database system architectures therefor
    • 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
    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02DCLIMATE CHANGE MITIGATION TECHNOLOGIES IN INFORMATION AND COMMUNICATION TECHNOLOGIES [ICT], I.E. INFORMATION AND COMMUNICATION TECHNOLOGIES AIMING AT THE REDUCTION OF THEIR OWN ENERGY USE
    • Y02D10/00Energy efficient computing, e.g. low power processors, power management or thermal management

Abstract

The invention discloses a consensus method and device based on aggregate signatures and a space-time certification algorithm, wherein the method comprises the steps of establishing a transaction request, establishing an aggregate signature algorithm, completing transaction signatures by adopting a secret key generation algorithm and a signature algorithm in the aggregate signature algorithm based on the transaction request, aggregating transaction signatures, establishing a PoST algorithm, operating the PoST algorithm, broadcasting blocks to adjacent nodes through a network, verifying block transactions and storing, and if the verification is passed, placing new blocks into a local chain of a verification node, otherwise, discarding. On one hand, the invention adopts the aggregate signature algorithm, reduces the size and the capacity of the block, and improves the communication efficiency and the signature verification efficiency; on the other hand, the PoST algorithm of space certification and time certification is combined, so that the problems of energy waste and 51% of attacks are solved; therefore, the transaction data of the blockchain is guaranteed to have no possibility of being tampered, and the verification and confirmation of the transaction data can be rapidly carried out.

Description

Consensus method and device based on aggregate signature and space-time certification algorithm
Technical Field
The invention belongs to the technical field of block chains, and particularly relates to a consensus method and device based on an aggregate signature and a space-time attestation algorithm.
Background
The block chain is an open distributed type ledger, has the characteristics of decentralization and trust removal, and can ensure that nodes in different regions cooperate to maintain a data ledger which is an ordered block chain structure growing along with time. The block chain carries out block processing based on the consensus protocol to store information, so that the information cannot be tampered, and the information safety is improved.
Consensus protocol, which is the core technology in the blockchain system architecture, is a protocol that ensures that all nodes on the blockchain system synchronize with each other and negotiate a legitimate transaction to add it to the blockchain. The prior consensus protocols can be divided into two categories: one is a chain-based PoX consensus protocol, represented by Proof of Work (PoW) and Proof of rights (PoS), and the other is a Byzantine-based BFT-based consensus protocol, represented by Practical Byzantine Fault Tolerance (PBFT). The type of the PoX consensus protocol is mainly used for public block chains, namely any node can inquire and submit data. The BFT-type consensus protocol is mainly used for a federation block chain, namely, nodes of a system need to be selected in advance, and the protocol needs to obtain an explicit result in each round of consensus and cannot be changed.
The core idea of the PoW is to distribute block weights through calculation power competition among nodes, nodes participating in consensus compete to become a main node through calculation power consumption to solve a mathematical problem, and a node which firstly solves the mathematical problem becomes the main node. The mathematical problem is that the block header information is subjected to double SHA256 hash operation, i.e., F = (blockahead | | Nonce) < T, where F is a double SHA256 hash operation function, T is a target hash value, and blockaheader is block header information and includes a Nonce field, and a suitable Nonce field is solved so that the hash operation result on the complete blockaheader satisfies the target value requirement. However, poW has the following disadvantages:
(1) Energy waste: the successful block output requires a large number of hash operations, the calculation does not have any other function, and the nodes which fail to output the blocks also consume resources to the same extent.
(2) The performance is low: the block output interval of the algorithm is about 10 minutes, the validity of the block needs to generate 6 new blocks, and the throughput is low and difficult to be used for commercialization.
The core idea of the PoS is that the currency age of a node replaces computing power, the proportion of the currency age determines the difficulty of block generation, the larger the currency age held by the node is, the more likely the node wins when competing out a block, the PoS limits the search space to a range acceptable by the computing amount, and the mathematical problem is F = (BlockHead | | TimeStamp) < T × weight. F is a double SHA256 Hash operation function, the blockHeader is block header information and comprises a Timestamp field, the value range is between the last block time and the current time, weight is the age Weight of coins consumed for competition, and T is a target Hash value. However, poS has the following disadvantages:
(1) No harmful attack: poS's out-blocking has little cost, and attackers are prone to creating chain forks to replace legitimate backbones.
(2) 51% of attacks: an attacker has more than 50% of the rights in the network, the probability of being selected as a blockmaker in the current period is high, and there is a risk of being selected as a blockmaker continuously.
The core idea of PBFT is to select a main node from the nodes of the whole network to be responsible for creating a block, and then to achieve consensus through three stages of voting, namely a pre-preparation stage, a preparation stage and a submission stage, so as to solve the problem of the Byzantine general.
A pre-preparation stage: and selecting a main node from the whole network, broadcasting the transaction information sent by the client to the whole network by each node, collecting all transaction information by the main node, creating a new block and broadcasting the new block to the whole network.
A preparation stage: after each node receives the block information sent by the main node, the preparation stage is started from the preparation stage, the node verifies the block, and a preparation message is broadcast to other nodes after the verification is passed.
A submission stage: the node enters a submitting stage after broadcasting the preparation message to the whole network, if the node receives the preparation message of more than 2/3 nodes, a submitting message is broadcasted to the whole network, and if a node receives the submitting message of more than 2/3 nodes, a new block can be submitted to a local block chain, so that the consensus on the block with the latest height is achieved.
However, PBFT has the following disadvantages:
(1) The application is narrow: since the three-phase voting requires identity confirmation of the node, it can only be used in a federation chain or a private chain.
(2) The efficiency is low: each node needs to exchange messages, and when the number of the nodes reaches about 100, the communication performance is reduced very quickly.
Disclosure of Invention
The invention mainly aims to overcome the defects of the prior art and provide a consensus method and device based on a polymerization signature and a space-time certification algorithm.
In order to achieve the purpose, the invention adopts the following technical scheme:
the invention provides a consensus method based on an aggregate signature and a space-time attestation algorithm, which comprises the following steps of:
constructing a transaction request, wherein the transaction request is that a user initiates a transaction and submits transaction data to a block link point;
constructing an aggregation signature algorithm, wherein the aggregation signature algorithm comprises a key generation algorithm, a signature verification algorithm, a signature aggregation algorithm and an aggregation signature verification algorithm;
based on the transaction request, the user adopts a key generation algorithm and a signature algorithm in the aggregated signature algorithm to complete transaction signature;
after receiving the transaction which finishes the transaction signature, the block chain node calls a signature verification algorithm, puts the received transaction data, the verification public key and the transaction signature into the signature verification algorithm, and outputs a verification result of the signature of the transaction; if the verification is successful, the transaction is put into a public transaction pool, otherwise, the transaction is discarded;
for the transaction in the public transaction pool, after a block link point calls a signature aggregation algorithm to aggregate corresponding transaction and signatures, putting a transaction aggregation public key and an aggregation signature output by the algorithm into a block, and filling a block header with a version number, a Hash value of a previous block, a Merkle root of transaction data and a difficulty value;
constructing a PoST algorithm, wherein the PoST algorithm comprises a space proving process and a time proving process, and the space proving process comprises a Plot stage, a Farm stage and a Verify stage; the Plot stage is that a farmer node generates a plurality of farmer nodes locally and randomlyPlotSeed of cornPlotsseedInitializing the operating space according to the seed-farmer nodePoSpace.intAlgorithm generation in diskFThe files are stored in a memory of the file,Fthe document comprising a plurality ofPlotsFiles, eachPlotsFile systemPlotsseedA unique representation;
the Farm stage is a stage of generating a space certification by a farmer node, and the farmer node runs the space certification after receiving challenge hash of a verification nodePoSpace.proofGenerating a space certificate by an algorithm;
the Verify phase is to Verify the generated space certification; verifier receives spatial proofPoSpace.πPost-call space validationPoSpace.VerifyAlgorithm, proving the spacePoSpace.πA plurality of hash primitive values inL,RPairwise pairing, wherein the matching functions are in a forward computing process of input computing output, so that the running time is shorter, and the space certification passes verification after all the matching functions output True;
the time certification process is realized by a verifiable delay function and comprises a time initialization VDF.int stage, a time certification VDF.proof stage and a time verification VDF.verify stage; int stage is that the peasant node locally generates certification parameters and verification parameters required by running subsequent algorithm;
proof of time vdfPoSpace.πProof of space runs the vdfl,VDF.π);
The time verification vdf.verify phase verifies the generated time proof, and the verifier receives the time proof (l,VDF.π) Calling time to verify a VDF.verify algorithm, and proving that the time passes verification after the algorithm outputs True;
running PoST algorithm, the farmer node first calls the space-time initializationPoST.intThe algorithm initializes the disk space and inputs the space parameterskInitializing the public keypkGenerate, generatePlotsFile, then run-time-space attestationPoST.EvalAlgorithm, input difficulty value Charl, output time certificatel,VDF.π) And space certificationPoSpace.πThen putting the two results into a block head;
after a farmer node constructs a block, broadcasting the block to other adjacent nodes through a network;
and the verification node verifies after receiving a new block, if the output is the same, the new block is put into a local chain of the verification node, and if not, the new block is discarded.
As a preferred technical solution, in the aggregated signature algorithm, the key generation algorithm is as follows:
Figure 235993DEST_PATH_IMAGE001
i.e. to input a security parameterlBy usinglThe binary string of length is used as input running secret key to generate KeyGen algorithm and generate public keyXAnd a private keyxOutputting public and private key pair (X, x);
The signature algorithm is as follows:
Figure 562937DEST_PATH_IMAGE002
i.e. inputting public keyXPrivate keyxAnd the message to be signed m e {0,1} * Output signature σ = (d, z);
the signature verification algorithm is as follows:
Figure 628982DEST_PATH_IMAGE003
i.e. inputting public keyXMessage, messagemAnd a signature σ = (d, z) of the message, outputting a verification resultACCEPT/REJECT
The signature aggregation algorithm is as follows:
Figure 368530DEST_PATH_IMAGE004
i.e. all independent signatures a are input i Message m i And public key X i Exporting the aggregated verified public key
Figure 152815DEST_PATH_IMAGE005
And aggregate signatures
Figure 236177DEST_PATH_IMAGE006
The aggregate signature verification algorithm is as follows:
Figure 655264DEST_PATH_IMAGE007
inputting aggregated verification public key
Figure 267511DEST_PATH_IMAGE005
And aggregate signatures
Figure 40557DEST_PATH_IMAGE006
Outputting the verification result of the aggregated signatureACCEPT/ REJECT
As a preferred technical scheme, when transaction signing is carried out, firstly, a key generation algorithm is called, and security parameters are inputλOutput signature privacyA key and a public key for authentication; then, a signature algorithm is called, a signature private key and transaction data are input, and a signature of the transaction is output; and finally, adding the signature and the verification public key of the transaction to the tail of the transaction field, uploading the signature and the verification public key to the nearest block chain node, and waiting for the transaction to be packaged into the block.
As a preferable technical scheme, when transaction signatures are aggregated, the farmer nodes select from the transaction poolnEach transaction has respective transaction data and individual signature, and farmers invoke a signature aggregation algorithm to aggregate the signatures and input the aggregated signaturesnAn independent signature (sigma) 1 , σ 2 ,…,σ n ) Outputting a verified aggregate public key
Figure 396452DEST_PATH_IMAGE005
And an aggregated signature
Figure 905931DEST_PATH_IMAGE006
(ii) a Then constructing a block bodynPlacing the transaction, the aggregated public key and the signature into a zone block; after the transaction and the signature are integrated into the block, the farmer starts to construct a block header, and fills the block header with the version number, the Hash value of the previous block, the Merkle root of the transaction data and the difficulty value Charl.
As a preferred solution, in the Plot phase,Plotsthe file data structure is organized in a table form and generatedPlotsThe process of generating the file istableThe process of (2); each one of which isPlotsThe file contains 7tableEach oftableHas 2 k An item, whereinkIs a spatial parameter decided by the farmer node, and each item comprises two random integersL,RL,RIs a pair of ranges of [0, 2 ] k ]I.e. hash pre-image values;table i is pointed to by a hash pointertable i-1 Two entries of (2), thereby connecting twotableAre linked together.
As a preferred technical solution, in the Farm phase, the process of generating the spatial proof is as follows:
the prover P calculates according to the difficulty value Charla= Charl% 32, then according toaFrom each onePlotsOf documentstable 7 To obtain spatial proof quality in the item of
Figure 724632DEST_PATH_IMAGE008
If allPlotsOf documentstable 7 Is absent from
Figure 217930DEST_PATH_IMAGE009
Entry, the space proving process fails, and False is returned;
if present, is
Figure 377516DEST_PATH_IMAGE008
An entry from which it is basedtableThe hash pointer in (1) is searched forward to finally obtaintable 1 Of 32 entries, where each entry has two hash proto-values, all of which are the final spatial proofs.
As a preferred technical solution, the flow of the time certification is as follows:
an initialization algorithm:
Figure 39704DEST_PATH_IMAGE010
inputting a time parameterTAnd a security parameterλOutput generation (G,H),GIs a finite abelian group of unknown order,𝐻is a Hash function
Figure 728174DEST_PATH_IMAGE011
And (3) calculating an algorithm:
Figure 100002_DEST_PATH_IMAGE012
inputting parametersppAnd space certification
Figure 66358DEST_PATH_IMAGE013
Output function valueyThe function value proves
Figure 295214DEST_PATH_IMAGE014
Wherein
Figure 280750DEST_PATH_IMAGE015
And (3) verification algorithm:
Figure 405701DEST_PATH_IMAGE016
input space attestationPoSpace.πTime parameterTThe function value proves (l,VDF.π) Outputting the verification resultACCEPT/REJECT
As a preferred technical solution, the specific process of operating the PoST algorithm is as follows:
PoST.intthe initialization algorithm of (2) requires callingPoSpace. intAlgorithm, time parameterTSafety parameterλIs a parameter, a spatial parameter, specified by the blockchain systemkIs generated by farmers by themselves, the parameter determines the amount of space required to be invested by the farmers before consensus,pkis the public key of the farmer and contains the information required by the generation of the filePlotsseed(ii) a After the initialization stage, the farmer generates the file in the disk spacePlotsEach file is composed of onePlotsseedUnique representation, which contains 7 stored different random numbersL,RIs/are as followstable
PoST.EvalThe certification algorithm of (2) requires callingPoSpace.proofAndVDF.Evaltwo algorithms, operationVDF.EvalInput parameters ofλ,T ,G ,HAndPoSpace.proofall are parameters specified by the blockchain system; the farmer firstly operatesPoSpace.proofGenerated from a previous stagePlotsCalculation in a document
Figure 631846DEST_PATH_IMAGE017
a= Charl% 32, then according toqualityIn thatPlotsFinding the value corresponding to the Charl in the file and outputting a space certificatePoSpace.πThen will bePoSpace.πAsVDF.EvalAnd running the algorithm outputInter-provingy, (l, VDF.π) (ii) a After the calculation of the two stages, the farmer generates a time-space proof
Figure 133235DEST_PATH_IMAGE018
And packs the certificate into a constructed block and broadcasts the block.
The invention provides a consensus system based on aggregate signatures and a space-time certification algorithm, which comprises a transaction request construction module, an aggregate signature algorithm construction module, a transaction signature aggregation module, a PoST algorithm construction module, a PoST algorithm operation module, a block broadcasting module and a block transaction verification module;
the transaction request construction module is used for constructing a transaction request, wherein the transaction request is that a user initiates a transaction and submits transaction data to the block link point;
the aggregation signature algorithm construction module is used for constructing an aggregation signature algorithm, and the aggregation signature algorithm comprises a key generation algorithm, a signature verification algorithm, a signature aggregation algorithm and an aggregation signature verification algorithm;
the transaction signature module is used for completing transaction signature by a user by adopting a key generation algorithm and a signature algorithm in an aggregated signature algorithm based on a transaction request;
the transaction signature aggregation module is used for calling a signature verification algorithm after the block chain node receives the transaction for completing the transaction signature, putting the received transaction data, the verification public key and the transaction signature into the signature verification algorithm, and outputting a verification result of the signature of the transaction; if the verification is successful, the transaction is put into a public transaction pool, otherwise, the transaction is discarded;
the PoST algorithm building module is used for calling a signature aggregation algorithm by block chain nodes for the transaction in the public transaction pool to aggregate corresponding transaction and signatures, then putting a transaction aggregation public key and an aggregation signature output by the algorithm into a block body, and filling a version number, a Hash value of a previous block, a Merkle root of transaction data and a difficulty value into a block head;
the PoST algorithm operatesThe system comprises a line module, a line module and a verification module, wherein the line module is used for constructing a PoST algorithm, the PoST algorithm comprises a space certification process and a time certification process, and the space certification process comprises a Plot stage, a Farm stage and a Verify stage; the Plot stage is that a farmer node generates a plurality of farmer nodes locally and randomlyPlotSeed of cornPlotsseedInitializing the operating space according to the seed-farmer nodePoSpace.intAlgorithm generation in diskFThe files are stored in a memory of the file,Fthe document containing a plurality ofPlotsFiles, eachPlotsFile systemPlotsseedA unique representation;
the Farm stage is a stage for generating a space proof by a farmer node, and the farmer node runs the space proof after receiving challenge hash Charl of a verification nodePoSpace.proofGenerating a space certificate by an algorithm;
the Verify phase is to Verify the generated space certification; verifier receives spatial proofPoSpace.πPost-call space validationPoSpace.VerifyAlgorithm, proving the spacePoSpace.πA plurality of hash primitive values inL,RPairwise pairing, wherein the matching functions are in a forward computing process of input computing output, so that the running time is shorter, and the space certification passes verification after all the matching functions output True;
the time certification process is realized by a verifiable delay function and comprises a time initialization VDF.int stage, a time certification VDF.proof stage and a time verification VDF.verify stage; int stage is that the peasant node locally generates certification parameters and verification parameters required by running subsequent algorithm;
proof of time vdfPoSpace.πProof of space runs the vdfl,VDF.π);
The time verification vdf.verify stage verifies the generated time proof, and the verifier receives the time proof: (l,VDF.π) Then calling a time verification VDF.verify algorithm, and when the algorithm outputs True, the time proves to pass the verification;
running PoST algorithm, the farmer node first calls the time-space initializationPoST.intAlgorithm advancesInitialization of line disk space, input of space parameterskInitializing the public keypkGenerate, generatePlotsFile, then run-time-space attestationPoST.EvalAlgorithm, input difficulty value Charl, output time certificatel,VDF.π) And space certificationPoSpace.πThen putting the two results into the block head;
the block broadcasting module broadcasts a block to other adjacent nodes through a network after a farmer node constructs the block;
and the block transaction verification module is used for verifying after the verification node receives a new block, if the output is the same, the new block is placed in a local chain of the verification node, and if not, the new block is discarded.
Yet another aspect of the present invention provides a computer-readable storage medium storing a program which, when executed by a processor, implements the consensus method based on aggregate signature and spatio-temporal attestation algorithm.
Compared with the prior art, the invention has the following advantages and beneficial effects:
(1) The method has higher safety, and is mainly embodied in two aspects of transaction ductility attack and 51% malicious attack;
transaction extensibility attack: aiming at transaction data in a bitcoin network, an attacker can modify the value of the transaction data to generate a new transaction for an unconfirmed transaction under the condition that a signature is not changed, output transaction lists of the two transactions are the same, and the signatures can pass legal verification. In the consensus method designed by the invention, the aggregated signature is used as the signature of the transaction data, the sorting operation is added in the process of the aggregated signature, and for a plurality of independent signatures, if repeated signature data exists in the signatures, the transaction is directly discarded, thereby ensuring the security of the transaction.
51% malicious attack: aiming at the probabilistic consensus algorithm of PoW and PoS, if an attacker masters more than half of resources of the whole network, the attacker can replace the original main chain by creating a new branch chain and has the right of recording all block chain data. In the consensus method designed by the invention, poST is used as a main consensus algorithm, even if malicious nodes occupy most space resources and can accelerate the generation of space proofs, the speed of time proofs cannot be changed, and even if a malicious chain is created from a certain block, the malicious chain cannot catch up with the main chain, so that the safety of the main chain is ensured.
(2) The invention has higher analysis efficiency, and compared with the single signature in the previous block, the storage capacity of the signature aggregated by the signature is reduced by about 49.8%, and the signature verification time is reduced by about 72%.
Drawings
In order to more clearly illustrate the technical solutions in the embodiments of the present application, the drawings needed to be used in the description of the embodiments are briefly introduced below, and it is obvious that the drawings in the following description are only some embodiments of the present application, and it is obvious for those skilled in the art to obtain other drawings based on these drawings without creative efforts.
FIG. 1 is a node role definition event diagram according to an embodiment of the present invention;
FIG. 2 is a schematic flow chart of a PoST algorithm according to an embodiment of the present invention;
FIG. 3 is a diagram illustrating the structure of the files of plots according to the embodiment of the present invention;
FIG. 4 is a flow chart of a consensus method based on aggregate signatures and spatiotemporal attestation algorithms in accordance with an embodiment of the present invention;
FIG. 5 is a schematic structural diagram of a consensus system based on aggregate signatures and spatio-temporal attestation algorithm according to an embodiment of the present invention;
fig. 6 is a schematic structural diagram of a computer-readable storage medium according to an embodiment of the present invention.
Detailed Description
In order to make the technical solutions better understood by those skilled in the art, the technical solutions in the embodiments of the present application will be clearly and completely described below with reference to the drawings in the embodiments of the present application. It is to be understood that the embodiments described are only a few embodiments of the present application and not all 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 application.
Reference in the specification to "an embodiment" means that a particular feature, structure, or characteristic described in connection with the embodiment can be included in at least one embodiment of the specification. The appearances of the phrase in various places in the specification are not necessarily all referring to the same embodiment, nor are separate or alternative embodiments mutually exclusive of other embodiments. It is explicitly and implicitly understood by one skilled in the art that the embodiments described herein can be combined with other embodiments.
The invention utilizes the aggregate signature and the space-time certification (PoST) algorithm to realize a consensus method, on one hand, in order to reduce the size and the capacity of the block and improve the communication efficiency and the signature verification efficiency, the invention aggregates the transaction digital signatures in the block; on the other hand, block link points need to acquire final block output rights through competition, and in order to solve the problems of energy waste and 51% of attacks, the invention provides a PoST algorithm combining space certification and time certification.
Referring to fig. 1, the node roles of the present invention are defined,
the invention defines three roles, namely a user, a farmer node and a verification node.
The user is a source of transaction data, and the data local to the user is signed and then sent to the block chain node;
the peasant node is a node in a block chain, and the role of the peasant node needs to do three things: 1. verifying, aggregating and constructing blocks for the received transaction data and signatures, 2, running a space-time certification algorithm and putting a certification into a block header, 3, broadcasting the constructed blocks;
the verification node is a node in the block chain and verifies the transaction data, the signature and the space-time certificate in the block after receiving the new block.
The aggregated signature algorithm of the embodiment is constructed as follows:
the aggregated signature algorithm supports the compression of a plurality of transaction signatures in a block into one signature, and has the characteristic of single verification, namely the validity of all signatures can be determined by only verifying aggregated signatures, and the aggregated signature algorithm consists of 5 specific algorithms, specifically:
(1) The key generation algorithm:
Figure 2971DEST_PATH_IMAGE019
(ii) a Inputting a security parameterlGenerating a public keyXAnd a private keyxOutputting public and private key pair (X, x)。
(2) Signature algorithm:
Figure 65867DEST_PATH_IMAGE002
(ii) a Inputting public keyXPrivate keyxAnd the message to be signed m e {0,1} * Output signature σ = (d, z).
(3) Signature verification algorithm:
Figure 755474DEST_PATH_IMAGE020
(ii) a Inputting public keyXMessage, messagemAnd a signature σ = (d, z) of the message, outputting a verification resultACCEPT/REJECT
(4) Signature aggregation algorithm:
Figure 794975DEST_PATH_IMAGE021
(ii) a All independent signatures σ are input i Message m i And public key X i Exporting the aggregated verified public key
Figure 486594DEST_PATH_IMAGE005
And aggregate signatures
Figure 218926DEST_PATH_IMAGE006
(5) Aggregate signature verification algorithm:
Figure 897295DEST_PATH_IMAGE022
(ii) a Inputting aggregated verification public key
Figure 740486DEST_PATH_IMAGE005
And aggregate signatures
Figure 53655DEST_PATH_IMAGE006
Outputting the verification result of the aggregated signatureACCEPT/REJECT
The construction of the space-time proof (PoST) algorithm is as follows:
the PoST algorithm combines spatial and temporal attestation techniques, both of which are attestation protocols, and generally includes two roles: a prover and a verifier; referring to fig. 2, the PoST algorithm of the present embodiment is as follows:
the whole PoST algorithm consists of a space certification PoSpace algorithm and a time certification VDF algorithm and can be divided into three stages:PoST.int(spatio-temporal initialization algorithm),PoST.Eval(space-time attestation algorithm) andPoST.Verify(spatio-temporal verification algorithm) phase. WhereinPoST.intThe algorithm is composed ofPoSpace.intThe components of the algorithm are formed by the following steps,PoST.Evalalgorithm is composed ofPoSpace.proofAndVDF.Evalthe algorithm is composed of the following steps of,PoST.VerifybyPoSpace.VerifyAndVDF. Verifyand (4) algorithm composition. The PoST algorithm is executed in the order that the prover runs firstPoST.intGet the space file and then run on the basis of the space filePoST.EvalAnd obtaining corresponding space certification and time certification, namely instant space certification, and verifying the space certification and the time certification in the time-space certification respectively by the verifier operating the last step of the PoST algorithm.
The general space certification process can be divided into two stages, the first stage is called the initialization stage of the certifier, in this stage, the certifier firstly uses the Hash function to obtain some random Hash primitive image valuesL,R. After this stage the prover would save a size of one in the local disk spaceNDocument ofFThe generated random hash primitive image value is contained in the hash primitive image; the second phase, called the execution phase, is where the verifier first sends a challenge, call, to the prover, who follows the challenge from the documentFWhich returns a hash pre-image value (challenge to the solution of call) as a spatial proof.
Further, based on the two phases, the embodiment divides the space attestation process into three steps: the method comprises a Plot stage, a Farm stage and a Verify stage respectively, wherein the specific contents of the three stages are as follows:
(1) Plot phase:
the farmer node generates a plurality of nodes at local randomlyPlotSeed of cornPlotsseedOperating an initialization algorithm according to the seed farmerPoSpace.intGenerating in diskFThe files are stored in a memory of the file,Fthe document containing a plurality ofPlotsFiles, each ofPlotsFile groupPlotsseedA unique representation. The design of the schemePlotsThe file data structure is organized in the form of a table (table) and generatedPlotsThe process of generating the file istableThe process of (1).
Further, please refer to FIG. 3, eachPlotsThe file contains 7tableEach oftableHas 2 k An item, whereinkIs a spatial parameter decided by the farmer node, and each entry comprises two random integersL,RL,RIs a pair of ranges of [0, 2 ] k ]I.e. hash pre-image values;table i is pointed to by a hash pointertable i-1 Two entries of (2), thereby connecting twotableAre linked together.
(2) A Farm stage:
the Farm stage is a stage for generating a space certification by a farmer node, and the farmer runs after receiving challenge hash of a verification nodePoSpace.proofThe algorithm generates a spatial proof, and the whole process is as follows:
the prover P calculates from the difficulty value Charla= Charl% 32, then according toaFrom each onePlotsOf documentstable 7 To obtain spatial proof quality in the item of
Figure 461284DEST_PATH_IMAGE008
If allPlotsOf documentstable 7 Is absent from
Figure 859904DEST_PATH_IMAGE009
If the item is an item, the space proving process fails, and False is returned;
if present, is
Figure 772365DEST_PATH_IMAGE008
Entry, from the entry, is based ontableThe hash pointer in (1) is searched forward to finally obtaintable 1 Of 32 entries, where each entry has two hash proto-values, all of which are the final spatial proofs.
(3) Verify stage:
verifier receives spatial proof
Figure 707086DEST_PATH_IMAGE023
Back-callingPoSpace.VerifyAlgorithm, 64 pieces will beL,RThe values are paired pairwise, and the running time is shorter because the matching function is a forward calculation process of calculating output from input, and the space is proved to be verified after all the matching functions output True.
Further, the verifiable delay function may implement a time certification, a time certification algorithm consisting of
Figure 312379DEST_PATH_IMAGE024
The function value proof in the algorithm is the time proof in the embodiment, and the concrete is as follows:
an initialization algorithm:
Figure 696831DEST_PATH_IMAGE010
inputting a time parameterTAnd a security parameterλOutput generation: (G,H),GIs a finite abelian group of unknown order,𝐻is a Hash function
Figure 147404DEST_PATH_IMAGE011
And (3) calculating an algorithm:
Figure 169586DEST_PATH_IMAGE025
inputting parametersppAnd space certification
Figure 384929DEST_PATH_IMAGE013
Output function valueyThe function value proves
Figure 289300DEST_PATH_IMAGE014
In which
Figure 543564DEST_PATH_IMAGE015
And (3) verification algorithm:
Figure 936366DEST_PATH_IMAGE016
input space proofPoSpace.πTime parameterTThe function value proves (l,VDF.π) Outputting the verification resultACCEPT/REJECT
Further, the whole PoST algorithm runs as follows: after entering the block consensus stage, farmers in the network start to run the PoST algorithm, which is defined byPoST.intAnd an initialization algorithm ofPoST.EvalThe attestation algorithm of (1) consists of:
PoST.intthe initialization algorithm of (2) requires callingPoSpace. intAlgorithm, time parameterTSafety parameterλIs a parameter, a spatial parameter, specified by the blockchain systemkIs generated by farmers, the parameter determines the amount of space needed to be invested by the farmers before consensus,pkis the public key of the farmer and contains the information needed for generating the filePlotsseed(ii) a After the initialization stage, the farmer generates a file in the disk spacePlotsEach file is composed of onePlotsseedUnique representation, which contains 7 random numbersL,RIs/are as followstable
PoST.EvalThe certification algorithm of (2) requires callingPoSpace.proofAndVDF.Evaltwo algorithms, operationVDF.EvalInput parameters ofλ,T ,G ,HAndPoSpace.proofall are parameters specified by the blockchain system; the farmer operates firstPoSpace.proofGenerated from a previous stagePlotsCalculation in a document
Figure 617884DEST_PATH_IMAGE017
a= Charl% 32, then according toqualityIn thatPlotsFinding the value corresponding to the Charl in the file and outputting a space certificatePoSpace.πThen will bePoSpace.πAsVDF.EvalAnd running the algorithm to output a time certificationy, (l, VDF.π) (ii) a After the calculation of the two stages, the farmer generates a time-space proof
Figure 212813DEST_PATH_IMAGE018
And packs the certificate into a constructed block and broadcasts the block.
After receiving the new block, the nodes in the block chain network verify the space-time proof PoST in the block, and the verification nodes respectively callPoSpace.VerifyAndVDF.Verifytwo algorithms and outputting the verification result, e.g. both algorithms outputACCEPTIf the verification is successful, the new block is added into the local chain and broadcast, otherwise, the block is discarded.
Referring to fig. 4, in an embodiment of the present application, a consensus method based on aggregate signatures and spatio-temporal attestation algorithm is provided, including the following steps:
s1, transaction request and construction
The transaction request is the job the user does before submitting the transaction to the block link point. In the invention, the local data is assumed to be a transfer transaction from the user A to the user B, and the transaction data is in the local database of the user B, which represents that the account of the user B has an unused money.
S2, transaction signing and sending
When the user B wants to transfer the transaction to the user C, the user B signs the transaction, and the signing process is as follows:
s2.1 user B first calls
Figure 506653DEST_PATH_IMAGE026
Algorithm, input of safety parametersλOutputting the private signature key x B And a public key X for authentication B
S2.2, then call
Figure 503428DEST_PATH_IMAGE027
Algorithm, input signature private key x B And transaction data, outputting a signature σ for the transaction B = (d,z);
S2.3, finally signing the transaction with sigma B And verifying public key X B Added to the end of the transaction field, uploaded to the nearest blockchain node, and waiting for the transaction to be packed into a block.
S3, transaction signature aggregation
Block chain nodes invoke upon receipt of signed transactions
Figure 119961DEST_PATH_IMAGE028
Algorithm, verification public key X, and transaction data received B And transaction signature σ B Put into an algorithm and output a signature sigma of the transaction B The verification result of (1). And if the verification is successful, broadcasting the transaction to other nodes and putting the transaction into a public transaction pool, otherwise, discarding the transaction.
Further, the farmer node selects from the transaction poolnEach transaction having respective transaction data and a separate signature. The peasant calls
Figure 202186DEST_PATH_IMAGE029
The algorithm aggregates the signatures and inputsnIndividual signature (sigma) 1 , σ 2 ,…,σ n ) Outputting a verified aggregate public key
Figure 267094DEST_PATH_IMAGE005
And an aggregated signature
Figure 885420DEST_PATH_IMAGE006
. Then constructing a block bodynThe transaction, the aggregated public key and the signature are placed in a zone block. After the transaction and signature are integrated into the block, the farmer starts to build the block head and the version number and the previous blockThe Hash value, the Merkle root of the transaction data, the difficulty value call, etc. are filled into the block header.
S4, operating PoST algorithm
The farmer firstly callsPoST.intThe algorithm initializes the disk space and inputs the space parameterskInitializing the public keypkTo generatePlotsFiles, then runPoST.EvalAlgorithm, input difficulty value Charl, output time certificatel,VDF.π) And space certificationPoSpace.πThen both results are put in the block header.
S5, broadcasting block
After the farmer node constructs a block, the block is broadcasted to other adjacent nodes through the P2P network.
S6, verifying block transaction and storage
After receiving a new block, the verification node performs verification, and firstly extracts a verification aggregation public key from the block
Figure 908739DEST_PATH_IMAGE005
And aggregate signatures
Figure 947103DEST_PATH_IMAGE006
Then run
Figure 851254DEST_PATH_IMAGE030
The algorithm is verified and then extracted from the block header
Figure 822622DEST_PATH_IMAGE018
Call outPoST.VerifyAlgorithm, if both algorithms outputACCEPTThe new block is placed in the local chain of the verification node, otherwise it is discarded.
The invention combines the aggregation signature algorithm and the PoST algorithm, thereby ensuring the possibility of tampering the transaction data of the block chain and quickly verifying and confirming the transaction data.
It should be noted that, for the sake of simplicity, the foregoing method embodiments are described as a series of acts or combinations, but those skilled in the art should understand that the present invention is not limited by the described order of acts, as some steps may be performed in other orders or simultaneously according to the present invention.
Based on the same idea as the consensus method based on the aggregate signature and the space-time certification algorithm in the embodiment, the invention also provides a consensus system based on the aggregate signature and the space-time certification algorithm, and the system can be used for executing the consensus method based on the aggregate signature and the space-time certification algorithm. For convenience of explanation, the schematic structural diagram of the embodiment of the consensus system based on aggregate signatures and spatio-temporal attestation algorithms only shows the parts related to the embodiments of the present invention, and those skilled in the art will understand that the illustrated structure does not constitute a limitation of the apparatus, and may include more or less components than those illustrated, or combine some components, or arrange different components.
Referring to fig. 5, in another embodiment of the present application, a consensus system 100 based on aggregate signature and spatiotemporal attestation algorithm is provided, the system comprises a transaction request construction module 101, an aggregate signature algorithm construction module 102, a transaction signature module 103, a transaction signature aggregation module 104, a PoST algorithm construction module 105, a PoST algorithm execution module 106, a block broadcasting module 107, and a block transaction verification module 108;
the transaction request constructing module 101 is configured to construct a transaction request, where the transaction request is a transaction initiated by a user and transaction data is submitted to a block link point;
the aggregate signature algorithm building module 102 is configured to build an aggregate signature algorithm, where the aggregate signature algorithm includes a key generation algorithm, a signature verification algorithm, a signature aggregation algorithm, and an aggregate signature verification algorithm;
the transaction signature module 103 is configured to, based on the transaction request, enable the user to complete a transaction signature by using a key generation algorithm and a signature algorithm in an aggregated signature algorithm;
the transaction signature aggregation module 104 is configured to invoke a signature verification algorithm after the blockchain node receives the transaction that completes the transaction signature, put the received transaction data, the verification public key, and the transaction signature into the signature verification algorithm, and output a verification result of the signature of the transaction; if the verification is successful, the transaction is put into a public transaction pool, otherwise, the transaction is discarded;
the PoST algorithm construction module 105 is configured to, for a transaction in the public transaction pool, call a signature aggregation algorithm to aggregate a corresponding transaction and a signature by using block link points, put a transaction aggregation public key and an aggregation signature output by the algorithm into a block, and fill a version number, a Hash value of a previous block, a Merkle root of transaction data, and a difficulty value into a block header;
the PoST algorithm operating module 106 is configured to construct a PoST algorithm, where the PoST algorithm includes a spatial certification process and a time certification process, and the spatial certification process includes a Plot stage, a Farm stage, and a Verify stage; the Plot stage is that a farmer node generates a plurality of farmer nodes locally and randomlyPlotSeed of cornPlotsseedInitializing the operating space according to the seed-farmer nodePoSpace.intAlgorithm generation in diskFThe files are stored in a memory of the file,Fthe document containing a plurality ofPlotsFiles, eachPlotsFile groupPlotsseedA unique representation;
the Farm stage is a stage of generating a space certification by a farmer node, and the farmer node runs the space certification after receiving challenge hash of a verification nodePoSpace.proofGenerating a space certificate by an algorithm;
the Verify phase is to Verify the generated space proof; verifier receives spatial proofPoSpace.πPost-call space validationPoSpace.VerifyAlgorithm, proving the spacePoSpace.πA plurality of hash pre-image values inL,RPairwise matching, because the matching functions are a forward calculation process of input calculation and output, the running time is shorter, and after all the matching functions output True, the space certification passes verification;
the time certification process is realized through a verifiable delay function and comprises a time initialization VDF.int stage, a time certification VDF.proof stage and a time verification VDF.verify stage; int stage is that the peasant node locally generates certification parameters and verification parameters required by running subsequent algorithm;
proof of time vdfPoSpace.πProof of space runs the vdfl,VDF.π);
The time verification vdf.verify phase verifies the generated time proof, and the verifier receives the time proof (l,VDF.π) Calling time to verify a VDF.verify algorithm, and proving that the time passes verification after the algorithm outputs True;
running PoST algorithm, the farmer node first calls the space-time initializationPoST.intThe algorithm initializes the disk space and inputs the space parameterskInitializing the public keypkGenerate, generatePlotsFile, then run-time-space attestationPoST.EvalAlgorithm, input difficulty value Charl, output time certificatel,VDF.π) And space certificationPoSpace.πThen putting the two results into a block head;
the block broadcasting module 107 is configured to broadcast a block to other adjacent nodes through a network after the farmer node constructs the block;
the block transaction verification module 108 is configured to verify that the verification node receives a new block, and if the outputs are the same, place the new block in a local chain of the verification node, otherwise, discard the new block.
It should be noted that, the consensus system based on the aggregate signature and the space-time certification algorithm of the present invention corresponds to the consensus method based on the aggregate signature and the space-time certification algorithm of the present invention one to one, and the technical features and the beneficial effects thereof described in the above embodiment of the consensus method based on the aggregate signature and the space-time certification algorithm are all applicable to the embodiment of the consensus based on the aggregate signature and the space-time certification algorithm, and specific contents thereof may refer to the description in the embodiment of the method of the present invention, and are not described herein again, and thus, the present invention is declared.
In addition, in the implementation of the consensus system based on aggregate signature and spatio-temporal attestation algorithm according to the above embodiments, the logical division of the program modules is only an example, and in practical applications, the above functions may be allocated by different program modules according to needs, for example, due to the configuration requirements of corresponding hardware or the convenience of implementation of software, that is, the internal structure of the consensus system based on aggregate signature and spatio-temporal attestation algorithm is divided into different program modules to complete all or part of the above described functions.
Referring to fig. 6, in another embodiment, a storage medium 200 storing a consensus method based on aggregate signature and spatiotemporal attestation algorithm is provided, and a program is stored in a memory 201, and when executed by a processor 202, implements the consensus method based on aggregate signature and spatiotemporal attestation algorithm.
The memory 201 includes at least one type of readable storage medium, which includes flash memory, removable hard disk, multimedia card, card type memory (e.g., SD or DX memory, etc.), magnetic memory, magnetic disk, optical disk, etc. The memory 201 may in some embodiments be an internal storage unit of the electronic device, for example a removable hard disk of the electronic device. The memory 201 may also be an external storage device of the electronic device in other embodiments, such as a plug-in mobile hard disk, a Smart Media Card (SMC), a Secure Digital (SD) Card, a Flash memory Card (Flash Card), and the like, which are provided on the electronic device. Further, the memory 201 may also include both an internal storage unit and an external storage device of the electronic device. The memory 201 may be used not only to store application software installed in the electronic device and various types of data, such as codes based on an aggregate signature and a spatiotemporal attestation program, but also to temporarily store data that has been output or is to be output.
The processor 202 may be formed of an integrated circuit in some embodiments, for example, a single packaged integrated circuit, or may be formed of a plurality of integrated circuits packaged with the same or different functions, including one or more Central Processing Units (CPUs), microprocessors, digital Processing chips, graphics processors, and combinations of various control chips. The processor 202 is a Control Unit (Control Unit) of the electronic device, connects various components of the whole electronic device by using various interfaces and lines, and executes various functions and processes data of the electronic device by running or executing programs or modules (e.g., federal learning defense programs, etc.) stored in the memory 201 and calling data stored in the memory 201.
It will be understood by those skilled in the art that all or part of the processes of the methods of the embodiments described above can be implemented by a computer program, which can be stored in a non-volatile computer-readable storage medium, and can include the processes of the embodiments of the methods described above when the program is executed. Any reference to memory, storage, database, or other medium used in the embodiments provided herein may include non-volatile and/or volatile memory, among others. Non-volatile memory can include read-only memory (ROM), programmable ROM (PROM), electrically Programmable ROM (EPROM), electrically Erasable Programmable ROM (EEPROM), or flash memory. Volatile memory can include Random Access Memory (RAM) or external cache memory. By way of illustration and not limitation, RAM is available in a variety of forms such as Static RAM (SRAM), dynamic RAM (DRAM), synchronous DRAM (SDRAM), double Data Rate SDRAM (DDRSDRAM), enhanced SDRAM (ESDRAM), synchronous Link DRAM (SLDRAM), rambus (Rambus) direct RAM (RDRAM), direct Rambus Dynamic RAM (DRDRAM), and Rambus Dynamic RAM (RDRAM), among others.
The technical features of the above embodiments can be arbitrarily combined, and for the sake of brevity, all possible combinations of the technical features in the above embodiments are not described, but should be considered as the scope of the present specification as long as there is no contradiction between the combinations of the technical features.
The above embodiments are preferred embodiments of the present invention, but the present invention is not limited to the above embodiments, and any other changes, modifications, substitutions, combinations, and simplifications which do not depart from the spirit and principle of the present invention should be construed as equivalents thereof, and all such modifications are intended to be included in the scope of the present invention.

Claims (10)

1. The consensus method based on the aggregate signature and the space-time certification algorithm is characterized by comprising the following steps of:
constructing a transaction request, wherein the transaction request is that a user initiates a transaction and submits transaction data to a block link point;
constructing an aggregation signature algorithm, wherein the aggregation signature algorithm comprises a key generation algorithm, a signature verification algorithm, a signature aggregation algorithm and an aggregation signature verification algorithm;
based on the transaction request, the user adopts a key generation algorithm and a signature algorithm in the aggregated signature algorithm to complete transaction signature;
after receiving the transaction of which the transaction signature is completed, the block chain node calls a signature verification algorithm, puts the received transaction data, the verification public key and the transaction signature into the signature verification algorithm, and outputs a verification result of the signature of the transaction; if the verification is successful, the transaction is placed into a public transaction pool, otherwise, the transaction is discarded;
for the transaction in the public transaction pool, after a block link point calls a signature aggregation algorithm to aggregate corresponding transaction and signatures, putting a transaction aggregation public key and an aggregation signature output by the algorithm into a block, and filling a block header with a version number, a Hash value of a previous block, a Merkle root of transaction data and a difficulty value;
constructing a PoST algorithm, wherein the PoST algorithm comprises a space proving process and a time proving process, and the space proving process comprises a Plot stage, a Farm stage and a Verify stage; the Plot stage is that a farmer node generates a plurality of farmer nodes locally and randomlyPlotSeed(s)PlotsseedInitializing the operating space according to the seed-farmer nodePoSpace.intAlgorithm generation in diskFThe file(s) is (are) stored in a file,Fthe document comprising a plurality ofPlotsFiles, each ofPlotsFile systemPlotsseedA unique representation;
the Farm stage is a stage of generating a space certification by a farmer node, and the farmer node runs the space certification after receiving challenge hash of a verification nodePoSpace.proofGenerating a space certificate by an algorithm;
the Verify phase is a pairVerifying the generated space certificate; verifier receives spatial proofPoSpace.πPost-call space validationPoSpace.VerifyAlgorithm, proving the spacePoSpace.πA plurality of hash primitive values inL,RPairwise matching, because the matching functions are a forward calculation process of input calculation and output, the running time is shorter, and after all the matching functions output True, the space certification passes verification;
the time certification process is realized by a verifiable delay function and comprises a time initialization VDF.int stage, a time certification VDF.proof stage and a time verification VDF.verify stage; int stage is that the peasant node locally generates certification parameters and verification parameters required by running subsequent algorithm;
proof of time vdfPoSpace.πProof of space runs the vdfl,VDF.π);
The time verification vdf.verify phase verifies the generated time proof, and the verifier receives the time proof (l, VDF.π) Calling time to verify a VDF.verify algorithm, and proving that the time passes verification after the algorithm outputs True;
running PoST algorithm, the farmer node first calls the space-time initializationPoST.intThe algorithm initializes the disk space and inputs the space parameterskInitializing the public keypkGenerate, generatePlotsFile, then run-time-space attestationPoST.EvalAlgorithm, input difficulty value Charl, output time proof: (l,VDF.π) And space certificationPoSpace.πThen putting the two results into the block head;
after a farmer node constructs a block, broadcasting the block to other adjacent nodes through a network;
and the verification node verifies after receiving a new block, if the output is the same, the new block is put into a local chain of the verification node, and if not, the new block is discarded.
2. The consensus method based on aggregate signature and spatio-temporal attestation algorithm of claim 1, wherein in the aggregate signature algorithm, the key generation algorithm is as follows:
Figure 304006DEST_PATH_IMAGE001
i.e. to input a security parameterlBy usinglThe binary string of length is used as input running secret key to generate KeyGen algorithm and generate public keyXAnd a private keyxOutputting public and private key pair: (X, x);
The signature algorithm is as follows:
Figure 164515DEST_PATH_IMAGE002
i.e. import public keyXPrivate keyxAnd the message to be signed m e {0,1} * Output signature σ = (d, z);
the signature verification algorithm is as follows:
Figure 691311DEST_PATH_IMAGE003
i.e. inputting public keyXMessage, messagemAnd a signature σ = (d, z) of the message, outputting a verification resultACCEPT/REJECT
The signature aggregation algorithm is as follows:
Figure 711920DEST_PATH_IMAGE004
i.e. all independent signatures σ are input i Message m i And public key X i Outputting aggregated verification public key
Figure 33180DEST_PATH_IMAGE005
And aggregate signatures
Figure 380985DEST_PATH_IMAGE006
The aggregate signature verification algorithm is as follows:
Figure 947358DEST_PATH_IMAGE007
inputting aggregated verification public key
Figure 798639DEST_PATH_IMAGE005
And aggregate signatures
Figure 851653DEST_PATH_IMAGE006
Outputting the verification result of the aggregated signatureACCEPT/REJECT
3. The consensus method based on aggregate signatures and spatio-temporal attestation algorithms of claim 2, characterized in that when performing transaction signatures, the key generation algorithm is first invoked, and security parameters are enteredλOutputting a signature private key and a public key for verification; then, a signature algorithm is called, a signature private key and transaction data are input, and a signature of the transaction is output; and finally, adding the signature and the verification public key of the transaction to the tail of the transaction field, uploading the signature and the verification public key to the nearest block chain node, and waiting for the transaction to be packaged into the block.
4. A consensus method based on aggregate signatures and spatiotemporal attestation algorithms as claimed in claim 2 wherein the farmer node chooses from the transaction pool the transaction signatures are aggregatednEach transaction has respective transaction data and individual signature, and farmers invoke a signature aggregation algorithm to aggregate the signatures and input the aggregated signaturesnIndividual signature (sigma) 1 , σ 2 ,…,σ n ) Outputting a verified aggregated public key
Figure 421174DEST_PATH_IMAGE005
And an aggregated signature
Figure 289773DEST_PATH_IMAGE006
(ii) a Then the building block bodynPlacing the transaction, the aggregated public key and the signature into a zone block; after the transaction and the signature are integrated into the block, the farmer starts to construct a block head, and fills the block head with the version number, the Hash value of the previous block, the Merkle root of the transaction data and the difficulty value Charl.
5. Consensus method based on aggregate signatures and spatio-temporal attestation algorithms according to claim 1, characterized by that, in the Plot phase,Plotsthe file data structure is organized in a table form and generatedPlotsThe process of generating the file istableThe process of (2); each one of which isPlotsThe file contains 7tableEach oftableHas 2 k An item, whereinkIs a spatial parameter decided by the farmer node, and each item comprises two random integersL,RL,RIs a pair of ranges of [0, 2 ] k ]The random integer of (2), namely the hash pre-image value;table i is pointed to by a hash pointertable i-1 Two entries of (2), thereby connecting twotableAre linked together.
6. The consensus method based on aggregate signatures and spatio-temporal attestation algorithms of claim 5, wherein in the Farm phase, the process of generating the spatial attestation is as follows:
the prover P calculates according to the difficulty value Charla= Charl% 32, then according toaFrom each onePlotsOf documentstable 7 In the item of (a) to obtain a spatial proof quality
Figure 293763DEST_PATH_IMAGE008
If allPlotsOf documentstable 7 Is absent from
Figure 956826DEST_PATH_IMAGE009
Item(s)If the space proving process fails, returning to False;
if present, is
Figure 544802DEST_PATH_IMAGE008
An entry from which it is basedtableThe hash pointer in the hash table is searched forward to finally obtaintable 1 Of 32 entries, where each entry has two hash proto-values, all of which are the final spatial proofs.
7. The consensus method based on aggregate signature and spatio-temporal attestation algorithm as claimed in claim 1, wherein the flow of the temporal attestation is:
an initialization algorithm:
Figure 721486DEST_PATH_IMAGE010
inputting a time parameterTAnd safety parametersλOutput generation (G,H),GIs a finite abelian group of unknown order,𝐻is a Hash function
Figure 812939DEST_PATH_IMAGE011
And (3) calculating an algorithm:
Figure DEST_PATH_IMAGE012
inputting parametersppAnd space certification
Figure 538581DEST_PATH_IMAGE013
Output function valueyValue of function proving
Figure 817115DEST_PATH_IMAGE014
Wherein
Figure 57210DEST_PATH_IMAGE015
And (3) verification algorithm:
Figure 268749DEST_PATH_IMAGE016
input space proofPoSpace.πTime parameterTThe function value proves (l,VDF.π) Outputting the verification resultACCEPT/REJECT
8. The consensus method based on aggregate signatures and spatio-temporal attestation algorithms of claim 1, wherein the specific procedure for running the PoST algorithm is:
PoST.intthe initialization algorithm of (2) requires callingPoSpace.intAlgorithm, time parameterTSafety parameterλIs a parameter, a spatial parameter, specified by the blockchain systemkIs generated by farmers, the parameter determines the amount of space needed to be invested by the farmers before consensus,pkis the public key of the farmer and contains the information required by the generation of the filePlotsseed(ii) a After the initialization stage, the farmer generates the file in the disk spacePlotsEach file is composed of onePlotsseedUnique representation, which contains 7 random numbersL,RIs/are as followstable
PoST.EvalThe certification algorithm of (2) requires callingPoSpace.proofAndVDF.Evaltwo algorithms, operationVDF.EvalInput parameters ofλ,T,G,HAndPoSpace.proofall are parameters specified by the blockchain system; the farmer firstly operatesPoSpace.proofGenerated from a previous stagePlotsCalculation in a document
Figure 306237DEST_PATH_IMAGE017
a= Charl% 32, then according toqualityIn thatPlotsFinding the value corresponding to the Charl in the file and outputting a space certificatePoSpace.πThen will bePoSpace.πAsVDF.EvalAnd running the algorithm to output a time certificationy, (l,VDF.π) (ii) a After the calculation of the two stages, the farmer generates a time-space proof
Figure 603226DEST_PATH_IMAGE018
Packing the certificate into a constructed block and broadcasting the block; wherein the content of the first and second substances,λas a parameter of the time, it is,Tin order to be a safety parameter, the system,Gis a finite abelian group of unknown order,𝐻is a Hash function.
9. The consensus system based on the aggregate signature and the space-time certification algorithm is characterized by comprising a transaction request construction module, an aggregate signature algorithm construction module, a transaction signature aggregation module, a PoST algorithm construction module, a PoST algorithm operation module, a block broadcasting module and a block transaction verification module;
the transaction request construction module is used for constructing a transaction request, wherein the transaction request is that a user initiates a transaction and submits transaction data to the block link point;
the aggregation signature algorithm construction module is used for constructing an aggregation signature algorithm, and the aggregation signature algorithm comprises a key generation algorithm, a signature verification algorithm, a signature aggregation algorithm and an aggregation signature verification algorithm;
the transaction signature module is used for completing transaction signature by a user by adopting a key generation algorithm and a signature algorithm in an aggregated signature algorithm based on a transaction request;
the transaction signature aggregation module is used for calling a signature verification algorithm after the block chain node receives the transaction for completing the transaction signature, putting the received transaction data, the verification public key and the transaction signature into the signature verification algorithm, and outputting a verification result of the signature of the transaction; if the verification is successful, the transaction is placed into a public transaction pool, otherwise, the transaction is discarded;
the PoST algorithm building module is used for calling a signature aggregation algorithm by block chain nodes for the transaction in the public transaction pool to aggregate corresponding transaction and signatures, then putting a transaction aggregation public key and an aggregation signature output by the algorithm into a block body, and filling a version number, a Hash value of a previous block, a Merkle root of transaction data and a difficulty value into a block head;
the PoST algorithm operation module is used for constructing a PoST algorithm, and the PoST algorithm packageThe method comprises a space proving process and a time proving process, wherein the space proving process comprises a Plot stage, a Farm stage and a Verify stage; the Plot stage is that a farmer node generates a plurality of farmer nodes locally and randomlyPlotSeed(s)PlotsseedAccording to the initialization of the operating space of the seed farmer nodePoSpace.intAlgorithm generation in diskFThe file(s) is (are) stored in a file,Fthe document comprising a plurality ofPlotsFiles, eachPlotsFile systemPlotsseedA unique representation;
the Farm stage is a stage of generating a space certification by a farmer node, and the farmer node runs the space certification after receiving challenge hash of a verification nodePoSpace.proofGenerating a space certificate by an algorithm;
the Verify phase is to Verify the generated space proof; the verifier receives the space proofPoSpace.πPost-call space validationPoSpace.VerifyAlgorithm, proving the spacePoSpace.πA plurality of hash pre-image values inL,RPairwise matching, because the matching functions are a forward calculation process of input calculation and output, the running time is shorter, and after all the matching functions output True, the space certification passes verification;
the time certification process is realized by a verifiable delay function and comprises a time initialization VDF.int stage, a time certification VDF.proof stage and a time verification VDF.verify stage; int stage is that farmer node locally generates proof parameter and verification parameter needed for running follow-up algorithm;
proof of time vdfPoSpace.πProof of space runs the vdfl,VDF.π);
The time verification vdf.verify phase verifies the generated time proof, and the verifier receives the time proof (l, VDF.π) Calling time to verify a VDF.verify algorithm, and proving that the time passes verification after the algorithm outputs True;
running PoST algorithm, the farmer node first calls the space-time initializationPoST.intThe algorithm initializes the disk space and inputs the space parameterskBeginning ofInitialized public keypkTo generatePlotsFile, then run-time-space attestationPoST.EvalAlgorithm, input difficulty value Charl, output time certificatel,VDF.π) And space certificationPoSpace.πThen putting the two results into a block head;
the block broadcasting module broadcasts a block to other adjacent nodes through a network after a farmer node constructs the block;
and the block transaction verification module is used for verifying after the verification node receives a new block, if the output is the same, the new block is placed in a local chain of the verification node, and if not, the new block is discarded.
10. A computer-readable storage medium storing a program, wherein the program, when executed by a processor, implements the consensus method based on aggregate signature and spatio-temporal attestation algorithm of any one of claims 1-8.
CN202210940999.2A 2022-08-08 2022-08-08 Consensus method and device based on aggregate signature and space-time certification algorithm Active CN115021944B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202210940999.2A CN115021944B (en) 2022-08-08 2022-08-08 Consensus method and device based on aggregate signature and space-time certification algorithm

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202210940999.2A CN115021944B (en) 2022-08-08 2022-08-08 Consensus method and device based on aggregate signature and space-time certification algorithm

Publications (2)

Publication Number Publication Date
CN115021944A CN115021944A (en) 2022-09-06
CN115021944B true CN115021944B (en) 2022-11-04

Family

ID=83065475

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202210940999.2A Active CN115021944B (en) 2022-08-08 2022-08-08 Consensus method and device based on aggregate signature and space-time certification algorithm

Country Status (1)

Country Link
CN (1) CN115021944B (en)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN116938951B (en) * 2023-09-18 2024-02-13 哈尔滨工业大学(深圳)(哈尔滨工业大学深圳科技创新研究院) Block chain consensus method and system, electronic equipment and storage medium

Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US11245528B1 (en) * 2018-11-19 2022-02-08 Protocol Labs, Inc. Protocols for decentralized networks
CN114281893A (en) * 2021-12-22 2022-04-05 蚂蚁区块链科技(上海)有限公司 Processing method, device and equipment for block chain transaction

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US11171791B2 (en) * 2019-01-15 2021-11-09 0Chain, LLC Systems and methods of aggregate signing of digital signatures on multiple messages simultaneously using key splitting

Patent Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US11245528B1 (en) * 2018-11-19 2022-02-08 Protocol Labs, Inc. Protocols for decentralized networks
CN114281893A (en) * 2021-12-22 2022-04-05 蚂蚁区块链科技(上海)有限公司 Processing method, device and equipment for block chain transaction

Non-Patent Citations (3)

* Cited by examiner, † Cited by third party
Title
POW区块链共识算法分析与展望;戴安博等;《通信技术》;20191210(第12期);7-13 *
基于聚合签名的共识算法优化方案;苑超等;《计算机科学》;20180215(第02期);60-63 *
群智网络中基于区块链的有序聚合签名认证方案;杨坤伟;《电子学报》;20220228;358-365 *

Also Published As

Publication number Publication date
CN115021944A (en) 2022-09-06

Similar Documents

Publication Publication Date Title
US11388152B2 (en) Manicoding for communication verification
Zhang et al. Outsourcing service fair payment based on blockchain and its applications in cloud computing
US20210295321A1 (en) Methods for decentralized digital asset transfer and smart contract state transition
Duong et al. Twinscoin: A cryptocurrency via proof-of-work and proof-of-stake
EP4184404A1 (en) Script-based blockchain interaction
US9495668B1 (en) Computing solutions to a problem involving inversion of a one-way function
US20110083015A1 (en) System and method for an electronic signature for quick and efficient data authentication
CN111914027A (en) Searchable encryption method and system for block chain transaction keywords
Nazirkhanova et al. Information dispersal with provable retrievability for rollups
Wu et al. Certificateless aggregate signature scheme secure against fully chosen-key attacks
CN115021944B (en) Consensus method and device based on aggregate signature and space-time certification algorithm
Gabizon et al. Plumo: Towards scalable interoperable blockchains using ultra light validation systems
Wu et al. Distributed Timestamp Mechanism Based on Verifiable Delay Functions.
Qiao et al. Blockchain privacy protection scheme based on aggregate signature
Yu et al. Low powered blockchain consensus protocols based on consistent hash
US20220278854A1 (en) Unity Protocol Consensus
Kottursamy et al. A novel blockchain architecture with mutable block and immutable transactions for enhanced scalability
Alupotha et al. Origami store: UC-secure foldable datachains for the quantum era
Maharramov The Dusk Network Whitepaper
CN114092093A (en) Block chain transaction processing method and device, electronic equipment and readable medium
Mahmood et al. Survey of consensus protocols
Lei et al. BFastPay: A routing-free protocol for fast payment in bitcoin network
CN112348673A (en) Block chain transaction processing method and device
Zhang et al. Blockchain data provenance scheme based on grouping consensus and bm tree
CN115632791B (en) Dynamic cross-chain data consistency decentration verification method

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