CN115021944A - 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
CN115021944A
CN115021944A CN202210940999.2A CN202210940999A CN115021944A CN 115021944 A CN115021944 A CN 115021944A CN 202210940999 A CN202210940999 A CN 202210940999A CN 115021944 A CN115021944 A CN 115021944A
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.)
Granted
Application number
CN202210940999.2A
Other languages
Chinese (zh)
Other versions
CN115021944B (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

Landscapes

  • Engineering & Computer Science (AREA)
  • Business, Economics & Management (AREA)
  • Theoretical Computer Science (AREA)
  • Finance (AREA)
  • Databases & Information Systems (AREA)
  • Accounting & Taxation (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Computer Security & Cryptography (AREA)
  • Signal Processing (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • General Engineering & Computer Science (AREA)
  • Data Mining & Analysis (AREA)
  • Computing Systems (AREA)
  • Development Economics (AREA)
  • Economics (AREA)
  • Marketing (AREA)
  • Strategic Management (AREA)
  • Technology Law (AREA)
  • General Business, Economics & Management (AREA)
  • Data Exchanges In Wide-Area Networks (AREA)
  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)

Abstract

The invention discloses a consensus method and a consensus device based on an aggregate signature and a space-time certification algorithm. 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 combining space certification and time certification solves the problems of energy waste and 51% attack; 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, wherein the data ledger is an ordered block chain type structure which grows 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-like consensus protocol, represented by Practical Byzantine Fault Tolerance (PBFT). The PoX-type consensus protocol is mainly used for public blockchains, that is, any node can query and submit data, and the protocol firstly determines a maintained data ledger branch and selects a unique branch from a plurality of ledger branches of the blockchain to store the branch. 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, namely F = (Block Head | | Nonce) < T, wherein F is a double SHA256 hash operation function, T is a target hash value, the Block Header is the block header information and comprises a Nonce field, and the hash operation result of the complete Block Header meets the target value requirement by solving the appropriate Nonce field. However, PoW has the following disadvantages:
(1) energy waste: a large number of hash operations are required for successful block output, the calculation does not have any other function, and the nodes which fail to output the blocks 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% attack: an attacker who has more than 50% of the rights in the network has a high probability of being selected as the current time chunker and is at risk of being selected as the chunker on a continuous basis.
The core idea of PBFT is to select a master node from the nodes of the whole network to be responsible for creating blocks, and then the common identification is achieved through three stages of voting, namely a pre-preparation stage, a preparation stage and a submission stage, so that the problem of Byzantine general is solved.
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 node enters a preparation stage from the preparation stage, the node verifies the block, and broadcasts a preparation message to other nodes after the verification is passed.
A submission stage: after broadcasting the preparation message to the whole network, the node enters a submitting stage, if the node receives the preparation message of more than 2/3 nodes, a submitting message is broadcasted to the whole network, if a node receives the submitting message of more than 2/3 nodes, new blocks can be submitted to a local block chain, and the consensus of the blocks 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 certification algorithm, which comprises the following steps:
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 secret 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 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 proof; 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 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 687390DEST_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 791481DEST_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 508901DEST_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 91061DEST_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 843116DEST_PATH_IMAGE005
And aggregate signatures
Figure 852529DEST_PATH_IMAGE006
The aggregate signature verification algorithm is as follows:
Figure 57246DEST_PATH_IMAGE007
inputting aggregated verification public key
Figure 448956DEST_PATH_IMAGE005
And aggregate signatures
Figure 55518DEST_PATH_IMAGE006
Outputting the verification result of the aggregated signatureACCEPT/ REJECT
As a preferable technical scheme, when performing transaction signature, firstly, a secret key generation algorithm is called, and a security parameter is inputλ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.
As a preferred 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 signaturesnIndividual signature (sigma) 1 , σ 2 ,…,σ n ) Outputting a verified aggregate public key
Figure 970253DEST_PATH_IMAGE005
And an aggregated signature
Figure 193424DEST_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 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.
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 suitable for farmersSpatial parameters determined by nodes, each entry containing 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.
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 851807DEST_PATH_IMAGE008
If allPlotsOf documentstable 7 Is absent from
Figure 578455DEST_PATH_IMAGE009
Entry, the space proving process fails, and False is returned;
if present, is
Figure 195250DEST_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 374559DEST_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 836633DEST_PATH_IMAGE011
And (3) calculating an algorithm:
Figure 417787DEST_PATH_IMAGE012
inputting parametersppAnd space certification
Figure 674325DEST_PATH_IMAGE013
Output function valueyThe function value proves
Figure 606509DEST_PATH_IMAGE014
Wherein
Figure 606694DEST_PATH_IMAGE015
And (3) verification algorithm:
Figure 307934DEST_PATH_IMAGE016
input space proofPoSpace.π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 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 of (C) are parameters specified by the blockchain systemCounting; the farmer firstly operatesPoSpace.proofGenerated from a previous stagePlotsCalculation in a document
Figure 266532DEST_PATH_IMAGE017
a= Charl% 32, then according toqualityIn thatPlotsFinding the value of the corresponding 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 31486DEST_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 aggregation 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 which finishes 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 to aggregate corresponding transactions and signatures for transactions in a public transaction pool by block chain nodes, then putting a transaction aggregation public key and an aggregation signature output by the algorithm into a block, 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, 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 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 vdfParty calculation time of acquisition certificate (l,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 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 put into 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-extension attacks: 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 a main chain, so that the safety of the main chain is guaranteed.
(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 spatio-temporal attestation algorithms according to 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 a person 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, the 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 the certification into block headers, 3, broadcasting the constructed blocks;
the verification node is a node in the block chain, and after receiving the new block, the transaction data, the signature and the space-time certification in the block are verified.
The aggregate 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 100942DEST_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 656688DEST_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 786187DEST_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 161805DEST_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 503793DEST_PATH_IMAGE005
And aggregate signatures
Figure 648467DEST_PATH_IMAGE006
(5) Aggregate signature verification algorithm:
Figure 214446DEST_PATH_IMAGE022
(ii) a Inputting aggregated verification public key
Figure 77360DEST_PATH_IMAGE005
And aggregate signatures
Figure 223040DEST_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 a spatial attestation technique and a temporal attestation technique, both of which are attestation protocols, and generally includes two roles: provers and verifiers; 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.intAlgorithm 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) the 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 comprising a plurality ofPlotsFiles, eachPlotsFile systemPlotsseedA unique representation. 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 (2).
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 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.
(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 a challenge hash of a verification nodePoSpace.proofThe algorithm generates a spatial proof, and the whole process 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 487799DEST_PATH_IMAGE008
If allPlotsOf documentstable 7 Is absent from
Figure 693521DEST_PATH_IMAGE009
Entry, the space proving process fails, and False is returned;
if present, is
Figure 574889DEST_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) A Verify stage:
verifier receives spatial proof
Figure 196364DEST_PATH_IMAGE023
Back callPoSpace.VerifyAlgorithm, 64 pieces will beL,RThe values are paired pairwise, and the running time is shorter because the matching functions are forward calculation processes which calculate output from input, and the space proves to be verified after all the matching functions output True.
Further, the verifiable delay function may implement time certification, a time certification algorithm consisting of
Figure 570756DEST_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 432533DEST_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 784886DEST_PATH_IMAGE011
And (3) calculating an algorithm:
Figure 288680DEST_PATH_IMAGE012
inputting parametersppAnd space certification
Figure 511719DEST_PATH_IMAGE013
Output function valueyThe function value proves
Figure 809977DEST_PATH_IMAGE014
Wherein
Figure 384046DEST_PATH_IMAGE015
And (3) verification algorithm:
Figure 691531DEST_PATH_IMAGE016
input space attestationPoSpace.πTime parameterTThe function value proves (l,VDF.π) Outputting the verification resultACCEPT/REJECT
Furthermore, the whole PoST algorithm operation process is 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 (c) 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 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 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 firstly operatesPoSpace.proofGenerated from a previous stagePlotsCalculation in a document
Figure 378864DEST_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 503815DEST_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 evidence 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 one embodiment of the present application, a consensus method based on aggregate signatures and spatiotemporal attestation algorithms is provided, comprising the steps of:
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 signature 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 calls first
Figure 565181DEST_PATH_IMAGE025
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 676356DEST_PATH_IMAGE026
Algorithm, input signature private key x B And transaction data, outputting a signature σ for the transaction B = (d,z);
S2.3, signature of transaction sigma B And verifying public key X B Adding to the end of the transaction field, uploading 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 139568DEST_PATH_IMAGE027
Algorithm, verification public key X, and transaction data received B And a 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 its own transaction data and individual signature. The peasants call
Figure 779627DEST_PATH_IMAGE028
The algorithm aggregates the signatures and inputsnIndividual signature (sigma) 1 , σ 2 ,…,σ n ) Outputting a verified aggregate public key
Figure 734814DEST_PATH_IMAGE005
And an aggregated signature
Figure 893089DEST_PATH_IMAGE006
. Then the building block bodynThe transaction, the aggregated public key and the signature are placed in 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, the difficulty value Charl and the like.
S4, operating PoST algorithm
The farmer calls the abovePoST.intThe algorithm initializes the disk space and inputs the space parameterskInitializing the public keypkGenerate, 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, broadcast block
After a farmer node constructs a block, the block is broadcast to other neighboring nodes through the P2P network.
S6, verifying the 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 695960DEST_PATH_IMAGE005
And aggregate signatures
Figure 756188DEST_PATH_IMAGE006
Then run
Figure 277299DEST_PATH_IMAGE029
The algorithm is verified and then extracted from the block header
Figure 323753DEST_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 attestation algorithm in the embodiment, the invention also provides a consensus system based on the aggregate signature and the space-time attestation algorithm, and the system can be used for executing the consensus method based on the aggregate signature and the space-time attestation 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 signatures and spatio-temporal attestation algorithms is provided, the system comprises a transaction request construction module 101, an aggregate signatures 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 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 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 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 (Synchlink) DRAM (SLDRAM), Rambus (Rambus) direct RAM (RDRAM), direct bused dynamic RAM (DRDRAM), and bused dynamic RAM (RDRAM).
All possible combinations of the technical features in the above embodiments may not be described for the sake of brevity, but should be considered as being within the scope of the present disclosure 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 changes, modifications, substitutions, combinations, and simplifications 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 secret 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 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 Plot stages locally and randomlyPlotSeed(s)PlotsseedInitializing 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, each ofPlotsFile systemPlotsseedA unique representation;
the Farm stage is the farmer node generation spaceIn the proving stage, after the farmer node receives the challenge hash of the verification node, the operation space provesPoSpace.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 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;
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 799291DEST_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 656520DEST_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 586299DEST_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 452755DEST_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 761376DEST_PATH_IMAGE005
And aggregate signatures
Figure 38774DEST_PATH_IMAGE006
The aggregate signature verification algorithm is as follows:
Figure 943932DEST_PATH_IMAGE007
inputting aggregated verification public key
Figure 597767DEST_PATH_IMAGE005
And aggregate signatures
Figure 26474DEST_PATH_IMAGE006
Outputting the verification result of the aggregated signatureACCEPT/REJECT
3. The consensus method of claim 2, wherein the transaction signature is generated by first invoking a key generation algorithm and inputting security parametersλ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 aggregate public key
Figure 225505DEST_PATH_IMAGE005
And an aggregated signature
Figure 129876DEST_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 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. The consensus method based on aggregate signatures and spatio-temporal attestation algorithms according to claim 1, characterized in 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 7 filestableEach 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 1, 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 To obtain spatial proof quality in the item of
Figure 72556DEST_PATH_IMAGE008
If allPlotsOf documentstable 7 Is absent from
Figure 355770DEST_PATH_IMAGE009
Entry, the space proving process fails, and False is returned;
if present, is
Figure 240549DEST_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.
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 320632DEST_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 378586DEST_PATH_IMAGE011
And (3) calculating an algorithm:
Figure 326426DEST_PATH_IMAGE012
inputting parametersppAnd space certification
Figure 319790DEST_PATH_IMAGE013
Output function valueyThe function value proves
Figure 870857DEST_PATH_IMAGE014
Wherein
Figure 217656DEST_PATH_IMAGE015
And (3) verification algorithm:
Figure 537779DEST_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 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 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 firstly operatesPoSpace.proofGenerated from a previous stagePlotsCalculation in a document
Figure 702044DEST_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 225560DEST_PATH_IMAGE018
And packs the certificate into a constructed block and broadcasts the block.
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 aggregation 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 which finishes 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 to aggregate corresponding transactions and signatures for transactions in a public transaction pool by block chain nodes, then putting a transaction aggregation public key and an aggregation signature output by the algorithm into a block, 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 modeThe system comprises a block and a processing unit, wherein the block is used for constructing a PoST algorithm, 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 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.intAlgorithm to perform disk nullingInitialization of cells, input of spatial 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 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 put into 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 true CN115021944A (en) 2022-09-06
CN115021944B 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)

Cited By (1)

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

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20200228349A1 (en) * 2019-01-15 2020-07-16 0Chain, LLC Systems and methods of aggregate signing of digital signatures on multiple messages simultaneously using key splitting
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

Patent Citations (3)

* 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
US20200228349A1 (en) * 2019-01-15 2020-07-16 0Chain, LLC Systems and methods of aggregate signing of digital signatures on multiple messages simultaneously using key splitting
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区块链共识算法分析与展望", 《通信技术》 *
杨坤伟: "群智网络中基于区块链的有序聚合签名认证方案", 《电子学报》 *
苑超等: "基于聚合签名的共识算法优化方案", 《计算机科学》 *

Cited By (2)

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

Also Published As

Publication number Publication date
CN115021944B (en) 2022-11-04

Similar Documents

Publication Publication Date Title
CN109360100B (en) Transaction rapid confirmation method and device based on block chain technology
US11848920B2 (en) Manicoding for communication verification
CN111914027B (en) Block chain transaction keyword searchable encryption method and system
Wahab et al. Survey of consensus protocols
CN112163856A (en) Consensus method and system for block chain and Internet of things fusion scene
Nazirkhanova et al. Information dispersal with provable retrievability for rollups
US20200259663A1 (en) One-Time Data Signature System and Method with Untrusted Server Assistance
CN115021944B (en) Consensus method and device based on aggregate signature and space-time certification algorithm
Qiao et al. Blockchain privacy protection scheme based on aggregate signature
Asayag et al. Helix: A scalable and fair consensus algorithm resistant to ordering manipulation
CN114422146A (en) Anonymous sorting method for block chain main nodes
US20220278854A1 (en) Unity Protocol Consensus
Bezuidenhout et al. Permissionless blockchain systems as pseudo-random number generators for decentralized 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
US11831748B1 (en) Method and system for utilizing the infrastructure of a blockchain to enhance the degree of security and veracity of another blockchain
CN112765570B (en) Identity-based provable data holding method supporting data transfer
Mahmood et al. Survey of consensus protocols
Maharramov The Dusk Network Whitepaper
CN114092093A (en) Block chain transaction processing method and device, electronic equipment and readable medium
Lei et al. BFastPay: A routing-free protocol for fast payment in bitcoin network
Zhang et al. Blockchain-based Dynamic Time-encapsulated Data Auditing for Outsourcing Storage
Zhang et al. Blockchain data provenance scheme based on grouping consensus and bm tree
Jangid et al. An Overview of Blockchain Technology: Architecture, Consensus, and Future Trends
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