CN114978517B - Electronic voting method based on intelligent contract and distributed Elgamal algorithm - Google Patents

Electronic voting method based on intelligent contract and distributed Elgamal algorithm Download PDF

Info

Publication number
CN114978517B
CN114978517B CN202210888057.4A CN202210888057A CN114978517B CN 114978517 B CN114978517 B CN 114978517B CN 202210888057 A CN202210888057 A CN 202210888057A CN 114978517 B CN114978517 B CN 114978517B
Authority
CN
China
Prior art keywords
voting
node
qualified
votes
participation
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
CN202210888057.4A
Other languages
Chinese (zh)
Other versions
CN114978517A (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.)
Southwest Petroleum University
Original Assignee
Southwest Petroleum University
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Southwest Petroleum University filed Critical Southwest Petroleum University
Priority to CN202210888057.4A priority Critical patent/CN114978517B/en
Publication of CN114978517A publication Critical patent/CN114978517A/en
Application granted granted Critical
Publication of CN114978517B publication Critical patent/CN114978517B/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
    • G07CHECKING-DEVICES
    • G07CTIME OR ATTENDANCE REGISTERS; REGISTERING OR INDICATING THE WORKING OF MACHINES; GENERATING RANDOM NUMBERS; VOTING OR LOTTERY APPARATUS; ARRANGEMENTS, SYSTEMS OR APPARATUS FOR CHECKING NOT PROVIDED FOR ELSEWHERE
    • G07C13/00Voting apparatus
    • 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/30Public key, i.e. encryption algorithm being computationally infeasible to invert or user's encryption keys not requiring secrecy
    • H04L9/3006Public key, i.e. encryption algorithm being computationally infeasible to invert or user's encryption keys not requiring secrecy underlying computational problems or public-key parameters
    • H04L9/3013Public key, i.e. encryption algorithm being computationally infeasible to invert or user's encryption keys not requiring secrecy underlying computational problems or public-key parameters involving the discrete logarithm problem, e.g. ElGamal or Diffie-Hellman systems

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Security & Cryptography (AREA)
  • Computing Systems (AREA)
  • Theoretical Computer Science (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Management, Administration, Business Operations System, And Electronic Commerce (AREA)

Abstract

The invention discloses an electronic voting method based on a smart contract and a distributed Elgamal algorithm. The method ensures the anonymity of the voting participation node by performing ring signature on the votes. And the one-number one-ticket system of the electronic voting is realized by checking whether the ring signature has the link property or not so as to check the double voting or the malicious ticket swiping behavior. By introducing identity authentication of the voting participation nodes, sybil attack can be resisted, one-person one-vote system is realized, and fairness, justness and credibility of voting results are guaranteed. The votes are encrypted through the Elgamal encryption algorithm, the confidentiality of the votes is improved, and meanwhile, based on the homomorphic characteristic of the Elgamal encryption algorithm, the votes can be counted without being decrypted, so that the rapid, timed and accurate vote counting of the electronic voting system is realized.

Description

Electronic voting method based on intelligent contract and distributed Elgamal algorithm
Technical Field
The invention belongs to the field of electronic voting systems based on a block chain technology, and particularly relates to an electronic voting method based on an intelligent contract and a distributed Elgamal algorithm.
Background
In the current information era, the electronic voting system is slowly replacing the traditional paper voting due to the characteristics of low cost, high efficiency, convenience, rapidness and the like. However, with current electronic voting systems, there are still many problems to be solved. For example, existing electronic voting systems are mostly built on the basis of third-party servers, and such voting information is often questioned by voters and the public, and even information is tampered by hackers or malicious voting managers. In response to this problem, the emergence of blockchains and intelligent contracts provides a new idea for electronic voting systems. The block chain technology has the characteristics of decentration removal and no tampering, and provides a public information environment with credible information and a credible operation environment for computing for the electronic voting system. This provides a solution to the problems of over-centralized power, insufficient transparency, etc. of current electronic voting systems. In conclusion, the research combining the block chain technology and the electronic voting scheme has feasibility.
The block chain brings convenience to the electronic voting system and also brings privacy disclosure. The most fundamental characteristic of the electronic voting system is anonymity. The voter does not want his vote to be known to others and therefore the system should ensure that the relationship between the voter and their vote is not revealed. Therefore, when the block chain technology is combined with the electronic voting system, how to hide the relationship between voters and votes is the key point of research to ensure the anonymity of the electronic voting system.
There is also a troublesome problem in electronic voting systems: how to realize the timing and accurate ticket counting. That is, anyone cannot know the voting result before the voting process is finished, and the voting result needs to be accurately counted after the voting process is finished. In addition, when the timing and accurate ticket counting is realized, how to provide guarantee for the privacy of the votes is a problem to be solved urgently.
Disclosure of Invention
The invention aims to overcome one or more defects in the prior art and provides an electronic voting method based on a smart contract and a distributed Elgamal algorithm.
The purpose of the invention is realized by the following technical scheme:
an electronic voting method based on a smart contract and a distributed Elgamal algorithm is suitable for being applied to an electronic voting system based on a block chain, wherein the electronic voting system comprises a voting initiating node, one or more voting participation nodes and a verification node serving as a trusted third party; the electronic voting method comprises the following steps:
s1, a voting contract is initialized by a voting initiating node, and a first public parameter is returned to each voting participation node;
s2, each voting participation node generates own registration information according to the first public parameter, sends the own registration information to the voting initiation node, and sends the identity ID in the own registration information to the verification node;
s3, the voting initiation node respectively judges whether the corresponding voting participation nodes are qualified or not according to the registration information, registers the qualified voting participation nodes to a qualified roster, and then respectively sends a voting key to each qualified voting participation node;
the voting key is an Elgamal system key;
s4, the verification nodes respectively generate tuples required by ring signatures according to the identity IDs of the voting participation nodes and send the tuples to the corresponding voting participation nodes;
s5, each qualified voting participation node generates a ring signature according to the tuple of the node;
s6, each qualified voting participation node generates a self vote, and the vote is encrypted through an Elgamal encryption algorithm based on a self voting key;
s7, each qualified voting participation node signs the encrypted votes by using the ring signature of the qualified voting participation node, and sends the votes subjected to the ring signature to the voting initiation node;
wherein the ballot after being signed by the ring comprises a link label;
s8, the voting initiation node sends the received votes to a verification node;
s9, the verifying node judges whether the ring signature of the ballot is valid and whether the link label in the ballot is the same as the link labels in other ballots, if the ring signature is valid and the link label in the ballot is not the same as the link labels in other ballots, the ballot is judged to be qualified, if not, the ballot is judged to be unqualified, and then the voting initiating node is informed of the qualified or unqualified ballot result;
s10, recording qualified votes by the voting initiating node;
and S11, counting the votes and publishing the counting result of the votes if the voting initiation node determines that the current moment is the voting deadline time.
The first common parameter in S1 comprises a random large prime number q and a generator g, wherein
Figure DEST_PATH_IMAGE001
Figure 100002_DEST_PATH_IMAGE002
Is a q-order prime number group.
The registration information in S2 comprises a public key
Figure DEST_PATH_IMAGE003
And an identity ID; wherein the public key
Figure 888775DEST_PATH_IMAGE003
The generation steps are as follows:
the voting participation node selects a private key based on the first public parameter
Figure 100002_DEST_PATH_IMAGE004
Then, a public key is generated through an Elgamal key system
Figure 992866DEST_PATH_IMAGE003
Wherein
Figure DEST_PATH_IMAGE005
Figure 100002_DEST_PATH_IMAGE006
And t is the total number of voting participation nodes.
The generation steps of the voting key in the S3 are as follows:
voting initiation node recordingAll public keys transmitted by each eligible voting participant node
Figure 241445DEST_PATH_IMAGE003
And according to all public keys
Figure 292446DEST_PATH_IMAGE003
Reconstructing to obtain the voting key of each qualified voting participation node
Figure DEST_PATH_IMAGE007
Where n is the number of eligible voting participation nodes and z represents the public key associated with the voting participation node
Figure 310081DEST_PATH_IMAGE003
Subscript i in (1) differs from subscript number.
In S4, the specific steps of the verifying node generating the tuple required by the ring signature according to the identity ID of each voting participation node are as follows:
s01, selecting a q-order addition group
Figure 100002_DEST_PATH_IMAGE008
And q factorial group
Figure DEST_PATH_IMAGE009
Figure 850653DEST_PATH_IMAGE008
One generator P and bilinear pairs of
Figure 100002_DEST_PATH_IMAGE010
In which bilinear pairs
Figure DEST_PATH_IMAGE011
To be driven from
Figure 100002_DEST_PATH_IMAGE012
To
Figure DEST_PATH_IMAGE013
Bilinear mapping of (2);
s02, selecting a hash function I
Figure 100002_DEST_PATH_IMAGE014
Hash function two
Figure DEST_PATH_IMAGE015
And hash function three
Figure 100002_DEST_PATH_IMAGE016
(ii) a Wherein the hash function is one
Figure DEST_PATH_IMAGE017
Is SHA-256; hash function two
Figure 100002_DEST_PATH_IMAGE018
Hash function two
Figure 773478DEST_PATH_IMAGE015
Mapping to bit strings of arbitrary length
Figure 503537DEST_PATH_IMAGE008
A hash function of (a); hash function three
Figure DEST_PATH_IMAGE019
Hash function
Figure 100002_DEST_PATH_IMAGE020
Mapping to bit strings of arbitrary length
Figure 297049DEST_PATH_IMAGE002
The hash function of (a) above (b),
Figure DEST_PATH_IMAGE021
a bit string representing an arbitrary length;
s03, selecting k as a verification node private key, and calculating a verification node public key
Figure 100002_DEST_PATH_IMAGE022
Wherein
Figure DEST_PATH_IMAGE023
S04, publishing the second public parameter
Figure 100002_DEST_PATH_IMAGE024
S05, calculating a first intermediate parameter
Figure DEST_PATH_IMAGE025
And private key of voting participation node
Figure 100002_DEST_PATH_IMAGE026
Wherein
Figure DEST_PATH_IMAGE027
Identity ID of the node participating in the voting;
s06, forming tuple required by ring signature
Figure 100002_DEST_PATH_IMAGE028
Wherein the event is the voting event of the voting participation node,
Figure DEST_PATH_IMAGE029
w is the set of voting participant node identity IDs,
Figure 100002_DEST_PATH_IMAGE030
Figure DEST_PATH_IMAGE031
and participating the own weight value of the node for voting.
The specific steps of S6 are as follows:
SS1, each qualified voting participation node selects the voting option to obtain the self vote
Figure 100002_DEST_PATH_IMAGE032
SS2, each qualified voting participation node generates votes through an Elgamal encryption algorithm based on the voting key of the node
Figure 664314DEST_PATH_IMAGE032
Is encrypted by
Figure 100002_DEST_PATH_IMAGE033
Wherein
Figure DEST_PATH_IMAGE034
Figure 100002_DEST_PATH_IMAGE035
J is the total number of candidates contained in the voting contract,
Figure DEST_PATH_IMAGE036
the representative selects the first candidate and,
Figure 100002_DEST_PATH_IMAGE037
the representative selects the second candidate, and so on,
Figure DEST_PATH_IMAGE038
representing the selection of the jth candidate.
In S7, the specific steps of each qualified voting participation node signing the encrypted ballot by using its ring signature are as follows:
SSS1, each qualified voting participation node calculates the message abstract of the voting event
Figure 100002_DEST_PATH_IMAGE039
And a link label
Figure DEST_PATH_IMAGE040
Wherein
Figure 100002_DEST_PATH_IMAGE041
A voting participation node private key used in ring signature for each voting participation node;
SSS2, selecting a first random number R and a second random number
Figure DEST_PATH_IMAGE042
In which
Figure 100002_DEST_PATH_IMAGE043
Figure DEST_PATH_IMAGE044
Figure 100002_DEST_PATH_IMAGE045
SSS3, calculating second intermediate parameter
Figure DEST_PATH_IMAGE046
SSS4, calculating third intermediate parameter
Figure 100002_DEST_PATH_IMAGE047
SSS5, calculating the fourth intermediate parameter
Figure DEST_PATH_IMAGE048
In which
Figure 100002_DEST_PATH_IMAGE049
SSS6, calculating fifth intermediate parameter
Figure DEST_PATH_IMAGE050
SSS7, calculating sixth intermediate parameter
Figure 100002_DEST_PATH_IMAGE051
SSS8, generating signed ballot
Figure DEST_PATH_IMAGE052
In which
Figure 100002_DEST_PATH_IMAGE053
The specific steps of S9 are as follows:
s001, the verification node calculates the voting event message abstract of each qualified voting participation node
Figure DEST_PATH_IMAGE054
S002, calculating second intermediate parameters of all qualified voting participation nodes
Figure 100002_DEST_PATH_IMAGE055
Third intermediate parameter
Figure DEST_PATH_IMAGE056
And a fourth intermediate parameter
Figure 100002_DEST_PATH_IMAGE057
S003, verifying equation aiming at each qualified voting participation node
Figure DEST_PATH_IMAGE058
Whether the result is true or not; if yes, the ring signature is valid, and then S004 is executed; if not, the ring signature is invalid, and then S005 is executed;
s004, detecting votes of all qualified voting participation nodes
Figure 115299DEST_PATH_IMAGE052
Whether the link tag T in (1) is associated with votes of other qualified voting participation nodes
Figure 242524DEST_PATH_IMAGE052
If the link labels T in the votes are the same, the vote is judged to be selected
Figure 297068DEST_PATH_IMAGE052
To repeat the voting, S005 is then performed; if not, the ballot is determined
Figure 133437DEST_PATH_IMAGE052
Is qualified vote, then S006 is executed;
s005, judging the ballot
Figure 906220DEST_PATH_IMAGE052
Unqualified votes are selected, and then S006 is executed;
and S006, sending the result of the qualified or unqualified ballot to a voting initiating node.
In S11, the specific steps of counting votes and publishing the statistical result of the votes are as follows:
s0001, through
Figure 100002_DEST_PATH_IMAGE059
Calculating the voting result
Figure DEST_PATH_IMAGE060
S0002, result of voting
Figure 100002_DEST_PATH_IMAGE061
Calculating out candidate ticket number set
Figure DEST_PATH_IMAGE062
Wherein
Figure 100002_DEST_PATH_IMAGE063
Is the number of votes for the first candidate,
Figure DEST_PATH_IMAGE064
the number of votes for the second candidate, and so on,
Figure 100002_DEST_PATH_IMAGE065
the number of votes of the jth candidate;
and S0003, publishing a statistical result of the votes, wherein the statistical result comprises the number of votes of each candidate and the number of the derelict votes cast by all voting participation nodes.
The invention has the beneficial effects that:
(1) The anonymity of voting participation nodes is ensured by carrying out ring signature on the votes;
(2) By introducing identity authentication of the voting participation nodes, sybil attack can be resisted, one-person one-vote system is realized, and fairness, justness and credibility of voting results are guaranteed;
(3) Whether the ring signature has the link is checked, so that double voting or malicious vote swiping behaviors are checked, and a strict one-number one-vote system of electronic voting is realized;
(4) The ballot is encrypted through the Elgamal encryption algorithm, the confidentiality of the ballot is improved, and meanwhile, the ballot can be counted without decryption on the basis of the homomorphic characteristic of the Elgamal encryption algorithm, so that the rapid, timed and accurate vote counting of the electronic voting system is realized;
(5) The verification node is used as a credible third party, and the credible third party completes the initialization, calculation and validity verification of the ballot ring signature, and the steps can be synchronously carried out when the voting participation node and the voting initiation node communicate, so that the efficiency of electronic voting is improved, the calculation amount of a voting contract is reduced, and the consumption of gas is reduced.
Drawings
Fig. 1 is a flowchart of an electronic voting method.
Detailed Description
The technical solutions of the present invention will be described clearly and completely with reference to the following embodiments, and it should be understood that the described embodiments are only a part of the embodiments of the present invention, and not all of the embodiments. All other embodiments, which can be obtained by a person skilled in the art without inventive effort based on the embodiments of the present invention, are within the scope of the present invention.
The embodiment provides an electronic voting method based on a smart contract and a distributed Elgamal algorithm, which is applied to an electronic voting system based on a block chain and the smart contract, wherein the electronic voting system comprises a plurality of nodes located on the block chain, one of the nodes is a voting initiating node, one of the nodes is a verification node of a trusted third party, and the remaining one or more nodes are voting participation nodes. Referring to fig. 1, the electronic voting method based on the smart contract and the distributed Elgamal algorithm includes the following specific steps:
voting contract initialization phase:
s1, a voting contract is initialized by a voting initiating node, and a first public parameter is returned to each voting participation node. Parameters set by the voting initiation node when the voting contract is initialized comprise a voting name, voting options, registration deadline time, voting start time, voting deadline time, qualified roster and the like. Wherein the voting choices include candidate information. The voting contract is initialized by the parameters and then returns the first public parameter. The first common parameter comprises a random large prime number q and a generator g, wherein
Figure DEST_PATH_IMAGE066
Figure 351983DEST_PATH_IMAGE002
Is q-order prime number group.
Voter registration phase:
and S2, each voting participation node generates own registration information according to the first public parameter, sends the own registration information to the voting initiation node and sends the identity ID in the own registration information to the verification node. Wherein the registration information includes a public key
Figure 526612DEST_PATH_IMAGE003
And an identity ID.
Wherein the public key
Figure 268304DEST_PATH_IMAGE003
The generation steps are as follows: the voting participation node selects a private key based on the first public parameter
Figure 100002_DEST_PATH_IMAGE067
Then, a public key is generated through an Elgamal key system
Figure 262804DEST_PATH_IMAGE003
In which
Figure 997411DEST_PATH_IMAGE005
Figure 26547DEST_PATH_IMAGE006
And t is the total number of voting participation nodes.
And S3, the voting initiation node respectively judges whether the corresponding voting participation node is qualified or not according to each registration information, registers the qualified voting participation node to a qualified roster, and then respectively sends a voting key to each qualified voting participation node. The voting key is an Elgamal system key.
The specific steps of the voting initiation node respectively generating the voting keys required by each qualified voting participation node are as follows:
the voting initiation node records all public keys sent by all qualified voting participation nodes
Figure 204718DEST_PATH_IMAGE003
And according to all public keys
Figure 686515DEST_PATH_IMAGE003
Reconstructing to obtain the voting key of each qualified voting participation node
Figure 224813DEST_PATH_IMAGE007
Where n is the number of eligible voting participation nodes and z represents the public key with the voting participation node
Figure 514980DEST_PATH_IMAGE003
Subscript i in (1) is a different subscript number.
And S4, respectively generating tuples required by ring signatures by the verification node according to the identity IDs of the voting participation nodes, and sending the tuples to the corresponding voting participation nodes.
The verification node respectively generates tuples required by ring signatures according to the identity IDs of the voting participation nodes and comprises the following substeps:
substep S01, selecting q-order addition group
Figure 988687DEST_PATH_IMAGE008
And q factorial group
Figure 82413DEST_PATH_IMAGE009
Figure 34189DEST_PATH_IMAGE008
One generator P and bilinear pairs of
Figure 913283DEST_PATH_IMAGE010
In which bilinear pairs
Figure 823470DEST_PATH_IMAGE011
To be driven from
Figure 404493DEST_PATH_IMAGE012
To
Figure 159960DEST_PATH_IMAGE013
Bilinear mapping of (2).
Substep S02 of selecting a hash function one
Figure DEST_PATH_IMAGE068
And a hash function two
Figure 159140DEST_PATH_IMAGE015
And hash function three
Figure 177911DEST_PATH_IMAGE020
(ii) a Wherein the hash function one
Figure 246230DEST_PATH_IMAGE017
Is SHA-256; hash function two
Figure 100002_DEST_PATH_IMAGE069
Hash function two
Figure 477492DEST_PATH_IMAGE015
Mapping to bit strings of arbitrary length
Figure 190233DEST_PATH_IMAGE008
A hash function of (a); hash function three
Figure 35698DEST_PATH_IMAGE019
Hash function
Figure 466679DEST_PATH_IMAGE020
Mapping to bit strings of arbitrary length
Figure 439314DEST_PATH_IMAGE002
The hash function of (a) above (b),
Figure 475403DEST_PATH_IMAGE021
representing a bit string of arbitrary length.
Substep S03, selecting k as a private key of the verification node, and calculating a public key of the verification node
Figure 367136DEST_PATH_IMAGE022
Wherein
Figure 410047DEST_PATH_IMAGE023
Substep S04, publishing the second public parameter
Figure DEST_PATH_IMAGE070
Substep S05, calculating a first intermediate parameter
Figure 100002_DEST_PATH_IMAGE071
And private key of voting participation node
Figure DEST_PATH_IMAGE072
Wherein
Figure 170062DEST_PATH_IMAGE027
The identity ID of the node participating in the vote.
Substep S06, forming tuple required by ring signature
Figure 591816DEST_PATH_IMAGE028
Wherein the event is the voting event of the voting participation node,
Figure 795395DEST_PATH_IMAGE029
w is the set of voting participant node identity IDs,
Figure 935390DEST_PATH_IMAGE030
Figure 764674DEST_PATH_IMAGE031
and participating the own weight value of the node for voting.
Voter voting stage:
and S5, generating the ring signature of each qualified voting participation node according to the tuple received by each qualified voting participation node.
S6, each qualified voting participation node generates a self vote by selecting a voting option, and encrypts the vote through an Elgamal encryption algorithm based on a voting key received by the node. The method comprises the following substeps:
substep SS1, each qualified voting participation node selects voting options to obtain own votes
Figure 306514DEST_PATH_IMAGE032
And a substep SS2, wherein each qualified voting participation node generates votes through an Elgamal encryption algorithm based on the voting key thereof
Figure 680995DEST_PATH_IMAGE032
Is encrypted by
Figure 100002_DEST_PATH_IMAGE073
Wherein
Figure DEST_PATH_IMAGE074
Figure 100002_DEST_PATH_IMAGE075
J is the total number of candidates contained in the voting contract,
Figure 432919DEST_PATH_IMAGE036
representing the selection of the first bit candidateThe person or persons can be provided with the following functions,
Figure 812034DEST_PATH_IMAGE037
representing the selection of the second candidate, and so on,
Figure 208380DEST_PATH_IMAGE038
representing the selection of the jth candidate.
S7, each qualified voting participation node signs the encrypted votes by using the ring signature of the qualified voting participation node, and sends the votes subjected to the ring signature to the voting initiation node; wherein the ballot after ring signing comprises a link label.
Each qualified voting participation node uses the ring signature of the node to sign the encrypted votes, and the method comprises the following substeps:
sub-step SSS1, each qualified voting participation node calculates the self voting event message abstract
Figure DEST_PATH_IMAGE076
And a link label
Figure 100002_DEST_PATH_IMAGE077
Wherein
Figure 19341DEST_PATH_IMAGE041
And the voting participation node private key is used for the self ring signature of each voting participation node.
Substep SSS2, selecting a first random number R and a second random number
Figure 258562DEST_PATH_IMAGE042
In which
Figure 39436DEST_PATH_IMAGE043
Figure DEST_PATH_IMAGE078
Figure 100002_DEST_PATH_IMAGE079
Sub-step SSS3, calculating a second intermediate parameter
Figure DEST_PATH_IMAGE080
Sub-step SSS4, calculating third intermediate parameter
Figure 100002_DEST_PATH_IMAGE081
Sub-step SSS5, calculating a fourth intermediate parameter
Figure DEST_PATH_IMAGE082
Wherein
Figure 100002_DEST_PATH_IMAGE083
Sub-step SSS6, calculating fifth intermediate parameter
Figure 8398DEST_PATH_IMAGE050
Sub-step SSS7, calculating a sixth intermediate parameter
Figure 52577DEST_PATH_IMAGE051
Substep SSS8, generating signed ballot
Figure 326564DEST_PATH_IMAGE052
In which
Figure DEST_PATH_IMAGE084
And S8, the voting initiation node sends the received votes to the verification node.
S9, the verifying node judges whether the ring signature of the ballot is valid or not and whether the link tag in the ballot is the same as the link tags in other ballots or not, if the ring signature is valid and the link tag in the ballot is not the same as the link tags in other ballots, the ballot is judged to be qualified, if the ring signature is invalid and/or the link tag in the ballot is the same as the link tags in one or more other ballots, the ballot is judged to be unqualified, and then the voting initiating node is informed of the qualified or unqualified ballot result.
Wherein, S9 comprises the following substeps:
substep S001, the verification node calculates the voting event message abstract of each qualified voting participation node
Figure 100002_DEST_PATH_IMAGE085
Substep S002, calculating second intermediate parameters of each qualified voting participation node
Figure 301342DEST_PATH_IMAGE055
Third intermediate parameter
Figure DEST_PATH_IMAGE086
And a fourth intermediate parameter
Figure 100002_DEST_PATH_IMAGE087
Substep S003, validating equations for each eligible voting participant node
Figure DEST_PATH_IMAGE088
Whether the result is true; if yes, the ring signature is valid, and then substep S004 is executed; if not, the ring signature is invalid, and then sub-step S005 is performed.
Substep S004, detecting votes of each qualified voting participation node
Figure 265756DEST_PATH_IMAGE052
Whether the link tag T in (1) is associated with votes of other qualified voting participation nodes
Figure 949678DEST_PATH_IMAGE052
If yes, the votes of the voting participation node and the votes of other voting participation nodes have linkability, so that the votes are judged to be linked
Figure 773277DEST_PATH_IMAGE052
To repeat the voting, then, sub-step S005 is performed; if not, the ballot is determined
Figure 286167DEST_PATH_IMAGE052
To qualify for a vote, substep S006 is then performed.
Substep S005 determining the vote
Figure 511612DEST_PATH_IMAGE052
For a non-qualified vote, sub-step S006 is then performed.
And a substep S006 of sending the qualified or unqualified result of the vote to the vote initiating node.
And S10, recording qualified votes by the voting initiating node. In addition, the voting initiating node also returns the qualified or unqualified result of the vote to the corresponding voting participation node, so that the voting participation node can know the voting result of the voting participation node and realize the vote checking function.
The system statistics voting result stage:
and S11, counting the votes and publishing the counting result of the votes if the voting initiation node determines that the current moment is the voting deadline time.
The method for counting votes and publishing the counting result of the votes comprises the following substeps:
substep S0001 of passing
Figure 100002_DEST_PATH_IMAGE089
Calculating the voting result
Figure DEST_PATH_IMAGE090
Substep S0002, passing the voting result
Figure 100002_DEST_PATH_IMAGE091
Calculating out candidate ticket number set
Figure DEST_PATH_IMAGE092
In which
Figure 881282DEST_PATH_IMAGE063
Is the number of votes for the first candidate,
Figure 457757DEST_PATH_IMAGE064
the number of votes for the second candidate, and so on,
Figure 100002_DEST_PATH_IMAGE093
the number of votes of the jth candidate.
And a substep S0003 of publishing the statistical result of the vote. The statistical result comprises the number of votes of each candidate and the number of the loss votes cast by all the voting participation nodes.
Specifically, in the sub-step S002,
Figure 790650DEST_PATH_IMAGE055
the integrity verification derivation process is as follows:
Figure DEST_PATH_IMAGE094
Figure 100002_DEST_PATH_IMAGE095
the derivation process of integrity verification of (1) is:
Figure DEST_PATH_IMAGE096
in the sub-step S0001,
Figure 667339DEST_PATH_IMAGE089
the integrity verification derivation process is as follows:
by
Figure 100002_DEST_PATH_IMAGE097
The following can be obtained:
Figure DEST_PATH_IMAGE098
finally, the following components are obtained:
Figure 100002_DEST_PATH_IMAGE099
therefore, the temperature of the molten steel is controlled,
Figure DEST_PATH_IMAGE100
Figure 100002_DEST_PATH_IMAGE101
this is true.
In the sub-step S0002 of the present invention,
Figure 332544DEST_PATH_IMAGE061
the integrity verification derivation process is as follows:
because of the fact that
Figure DEST_PATH_IMAGE102
Therefore, it is possible to
Figure 100002_DEST_PATH_IMAGE103
This is true.
The foregoing is illustrative of the preferred embodiments of this invention, and it is to be understood that the invention is not limited to the precise form disclosed herein and that various other combinations, modifications, and environments may be resorted to, falling within the scope of the concept as disclosed herein, either as described above or as apparent to those skilled in the relevant art. And that modifications and variations may be effected by those skilled in the art without departing from the spirit and scope of the invention as defined by the appended claims.

Claims (1)

1. An electronic voting method based on a smart contract and a distributed Elgamal algorithm is suitable for being applied to an electronic voting system based on a block chain, wherein the electronic voting system comprises a voting initiation node, one or more voting participation nodes and a verification node serving as a trusted third party; the electronic voting method is characterized by comprising the following steps:
s1, a voting contract is initialized by a voting initiating node, and a first public parameter is returned to each voting participation node;
s2, each voting participation node generates own registration information according to the first public parameter, sends the own registration information to the voting initiation node, and sends the identity ID in the own registration information to the verification node;
s3, the voting initiation node respectively judges whether the corresponding voting participation node is qualified or not according to each registration information, registers the qualified voting participation node to a qualified roster, and then respectively sends a voting key to each qualified voting participation node;
the voting key is an Elgamal system key;
s4, the verification nodes respectively generate tuples required by ring signatures according to the identity IDs of the voting participation nodes and send the tuples to the corresponding voting participation nodes;
s5, each qualified voting participation node generates a ring signature according to the tuple of the node;
s6, each qualified voting participation node generates a self vote, and the vote is encrypted through an Elgamal encryption algorithm based on a self voting key;
s7, each qualified voting participation node signs the encrypted votes by using the ring signature of the qualified voting participation node, and sends the votes subjected to the ring signature to the voting initiation node;
wherein the ballot after ring signature comprises a link label;
s8, the voting initiation node sends the received votes to a verification node;
s9, the verifying node judges whether the ring signature of the ballot is valid and whether the link tag in the ballot is the same as the link tags in other ballots, if the ring signature is valid and the link tag in the ballot is not the same as the link tags in other ballots, the ballot is judged to be qualified, if not, the ballot is judged to be unqualified, and then the voting initiating node is informed of the qualified or unqualified result of the ballot;
s10, recording qualified votes by the voting initiating node;
s11, counting votes and publishing the counting result of the votes if the voting initiation node determines that the current moment is the voting deadline time;
the first common parameter in S1 comprises a random large prime number q and a generator g, wherein
Figure DEST_PATH_IMAGE002
Figure DEST_PATH_IMAGE004
Is q-order prime number group;
the registration information in S2 comprises a public key
Figure DEST_PATH_IMAGE006
And an identity ID; wherein the public key
Figure 139599DEST_PATH_IMAGE006
The generation steps are as follows:
the voting participation node selects a private key based on the first public parameter
Figure DEST_PATH_IMAGE008
Then, a public key is generated through an Elgamal key system
Figure 915794DEST_PATH_IMAGE006
Wherein
Figure DEST_PATH_IMAGE010
Figure DEST_PATH_IMAGE012
T is the total number of voting participation nodes;
the generation steps of the voting key in the S3 are as follows:
the voting initiation node records all public keys sent by all qualified voting participation nodes
Figure 690938DEST_PATH_IMAGE006
And according to all public keys
Figure 23831DEST_PATH_IMAGE006
Reconstructing to obtain the voting key of each qualified voting participation node
Figure DEST_PATH_IMAGE014
Where n is the number of eligible voting participation nodes and z represents the public key with the voting participation node
Figure 821891DEST_PATH_IMAGE006
Subscript i in (1) is different from subscript number;
in S4, the specific steps of the verifying node respectively generating the tuple required by the ring signature according to the identity ID of each voting participation node are as follows:
s01, selecting a q-order addition group
Figure DEST_PATH_IMAGE016
And q factorial group
Figure DEST_PATH_IMAGE018
Figure 175512DEST_PATH_IMAGE016
One generator P and bilinear pairs of
Figure DEST_PATH_IMAGE020
In which bilinear pairs
Figure DEST_PATH_IMAGE022
To be driven from
Figure DEST_PATH_IMAGE024
To
Figure DEST_PATH_IMAGE026
Bilinear mapping of (2);
s02, selecting a hash function I
Figure DEST_PATH_IMAGE028
Hash function two
Figure DEST_PATH_IMAGE030
And hash function three
Figure DEST_PATH_IMAGE032
(ii) a Wherein the hash function one
Figure DEST_PATH_IMAGE033
Is SHA-256; hash function two
Figure DEST_PATH_IMAGE035
Hash function two
Figure 393611DEST_PATH_IMAGE030
Mapping to bit strings of arbitrary length
Figure 264615DEST_PATH_IMAGE016
A hash function of (a); hash function three
Figure DEST_PATH_IMAGE037
Hash function
Figure 792548DEST_PATH_IMAGE032
Mapping to bit strings of arbitrary length
Figure 582649DEST_PATH_IMAGE004
The hash function of (a) above (b),
Figure DEST_PATH_IMAGE039
a bit string representing an arbitrary length;
s03, selecting k as a private key of the verification node, and calculating a public key of the verification node
Figure DEST_PATH_IMAGE041
Wherein
Figure DEST_PATH_IMAGE043
S04, publishing the second public parameter
Figure DEST_PATH_IMAGE045
S05, calculating a first intermediate parameter
Figure DEST_PATH_IMAGE047
And private key of voting participation node
Figure DEST_PATH_IMAGE049
Wherein
Figure DEST_PATH_IMAGE051
Identity ID of the node participating in the voting;
s06, forming tuple required by ring signature
Figure DEST_PATH_IMAGE053
Wherein the event is the voting event of the voting participation node,
Figure DEST_PATH_IMAGE055
w is the set of voting participant node identity IDs,
Figure DEST_PATH_IMAGE057
Figure DEST_PATH_IMAGE059
the weighted value of the voting participation node is self;
the specific steps of S6 are as follows:
SS1, each qualified voting participation node selects the voting option to obtain the self vote
Figure DEST_PATH_IMAGE061
SS2, each qualified voting participation node based on its voting key and through Elgamal encryptionAlgorithm generated ballot
Figure 428989DEST_PATH_IMAGE061
Is encrypted by
Figure DEST_PATH_IMAGE063
Wherein
Figure DEST_PATH_IMAGE065
Figure DEST_PATH_IMAGE067
J is the total number of candidates contained in the voting contract,
Figure DEST_PATH_IMAGE069
representing the selection of the first candidate,
Figure DEST_PATH_IMAGE071
representing the selection of the second candidate, and so on,
Figure DEST_PATH_IMAGE073
representing the selection of the jth candidate;
in S7, the specific steps of each qualified voting participation node signing the encrypted ballot using its ring signature are as follows:
SSS1, each qualified voting participation node calculates the self voting event message abstract
Figure DEST_PATH_IMAGE075
And a link label
Figure DEST_PATH_IMAGE077
Wherein
Figure DEST_PATH_IMAGE079
A voting participation node private key used when each voting participation node carries out ring signature;
SSS2, chooseA random number R and a second random number
Figure DEST_PATH_IMAGE081
Wherein
Figure DEST_PATH_IMAGE083
Figure DEST_PATH_IMAGE085
Figure DEST_PATH_IMAGE087
SSS3, calculating second intermediate parameter
Figure DEST_PATH_IMAGE089
SSS4, calculating third intermediate parameter
Figure DEST_PATH_IMAGE091
SSS5, calculating a fourth intermediate parameter
Figure DEST_PATH_IMAGE093
In which
Figure DEST_PATH_IMAGE095
SSS6, calculating fifth intermediate parameter
Figure DEST_PATH_IMAGE097
SSS7, calculating sixth intermediate parameter
Figure DEST_PATH_IMAGE099
SSS8, and ballot after signature generation
Figure DEST_PATH_IMAGE101
Wherein
Figure DEST_PATH_IMAGE103
The specific steps of S9 are as follows:
s001, the verification node calculates the voting event message abstract of each qualified voting participation node
Figure DEST_PATH_IMAGE105
S002, calculating second intermediate parameters of all qualified voting participation nodes
Figure DEST_PATH_IMAGE107
Third intermediate parameter
Figure DEST_PATH_IMAGE109
And a fourth intermediate parameter
Figure DEST_PATH_IMAGE111
S003, verifying equation aiming at each qualified voting participation node
Figure DEST_PATH_IMAGE113
Whether the result is true; if yes, the ring signature is valid, and then S004 is executed; if not, the ring signature is invalid, and then S005 is executed;
s004, detecting votes of all qualified voting participation nodes
Figure 361741DEST_PATH_IMAGE101
Whether the link tag T in (1) is associated with votes of other qualified voting participation nodes
Figure 557230DEST_PATH_IMAGE101
If the link labels T in the votes are the same, the vote is judged to be selected
Figure 518233DEST_PATH_IMAGE101
To repeat the voting, S005 is then performed;if not, the vote is judged
Figure 681230DEST_PATH_IMAGE101
Qualified votes are then executed S006;
s005, judging the ballot
Figure 487512DEST_PATH_IMAGE101
Unqualified votes are selected, and then S006 is executed;
s006, sending the result of the vote qualification or disqualification to a voting initiating node;
in S11, the specific steps of counting votes and publishing the statistical result of the votes are as follows:
s0001, through
Figure DEST_PATH_IMAGE115
Calculating the voting result
Figure DEST_PATH_IMAGE117
S0002, result of voting
Figure DEST_PATH_IMAGE119
Calculating a candidate vote set
Figure DEST_PATH_IMAGE121
In which
Figure DEST_PATH_IMAGE123
Is the number of votes for the first candidate,
Figure DEST_PATH_IMAGE125
the number of votes for the second candidate, and so on,
Figure DEST_PATH_IMAGE127
the number of votes of the jth candidate;
and S0003, publishing a statistical result of the votes, wherein the statistical result comprises the number of votes of each candidate and the number of the derelict votes cast by all voting participation nodes.
CN202210888057.4A 2022-07-27 2022-07-27 Electronic voting method based on intelligent contract and distributed Elgamal algorithm Active CN114978517B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202210888057.4A CN114978517B (en) 2022-07-27 2022-07-27 Electronic voting method based on intelligent contract and distributed Elgamal algorithm

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202210888057.4A CN114978517B (en) 2022-07-27 2022-07-27 Electronic voting method based on intelligent contract and distributed Elgamal algorithm

Publications (2)

Publication Number Publication Date
CN114978517A CN114978517A (en) 2022-08-30
CN114978517B true CN114978517B (en) 2022-10-21

Family

ID=82970372

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202210888057.4A Active CN114978517B (en) 2022-07-27 2022-07-27 Electronic voting method based on intelligent contract and distributed Elgamal algorithm

Country Status (1)

Country Link
CN (1) CN114978517B (en)

Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105376064A (en) * 2015-11-23 2016-03-02 河海大学 Anonymous message authentication system and message signing method thereof
CN110232764A (en) * 2019-05-16 2019-09-13 暨南大学 Anonymous Electronic Voting method and system based on block chain
CN113850947A (en) * 2020-12-28 2021-12-28 杭州趣链科技有限公司 Electronic voting system based on ElGamal encryption
CN114005217A (en) * 2021-10-21 2022-02-01 浙江工商大学 Electronic voting system and method based on block chain
CN114255034A (en) * 2021-11-09 2022-03-29 重庆邮电大学 Electronic voting method capable of verifying fairness based on block chain
CN114333137A (en) * 2021-12-16 2022-04-12 复旦大学 Anonymous and stress-resistant electronic voting system based on partial blind signature and block chain
CN114362987A (en) * 2021-08-02 2022-04-15 北京航空航天大学 Distributed voting system and method based on block chain and intelligent contract

Family Cites Families (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107833135A (en) * 2017-10-30 2018-03-23 中山大学 A kind of fair Protocol of Electronic Voting based on block chain
CN108494738B (en) * 2018-02-27 2020-10-27 华南理工大学 Verifiable post-quantum electronic voting system and implementation method thereof
US11062054B2 (en) * 2018-09-06 2021-07-13 MadHive, Inc. Methods and system for providing oversight and auditing of advertisement impressions and for running advertisement campaigns
CN114677794B (en) * 2022-03-18 2024-03-15 南京邮电大学 Electronic voting method based on block chain

Patent Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105376064A (en) * 2015-11-23 2016-03-02 河海大学 Anonymous message authentication system and message signing method thereof
CN110232764A (en) * 2019-05-16 2019-09-13 暨南大学 Anonymous Electronic Voting method and system based on block chain
CN113850947A (en) * 2020-12-28 2021-12-28 杭州趣链科技有限公司 Electronic voting system based on ElGamal encryption
CN114362987A (en) * 2021-08-02 2022-04-15 北京航空航天大学 Distributed voting system and method based on block chain and intelligent contract
CN114005217A (en) * 2021-10-21 2022-02-01 浙江工商大学 Electronic voting system and method based on block chain
CN114255034A (en) * 2021-11-09 2022-03-29 重庆邮电大学 Electronic voting method capable of verifying fairness based on block chain
CN114333137A (en) * 2021-12-16 2022-04-12 复旦大学 Anonymous and stress-resistant electronic voting system based on partial blind signature and block chain

Non-Patent Citations (2)

* Cited by examiner, † Cited by third party
Title
A new non-interactive deniable authentication protocol based on generalized ElGamal signature scheme;Y. Zhang等;《2011 6th IEEE Joint International Information Technology and Artificial Intelligence Conference》;20110929;全文 *
基于联盟链的匿名电子投票方案;于天娇等;《网络空间安全》;20191225(第12期);全文 *

Also Published As

Publication number Publication date
CN114978517A (en) 2022-08-30

Similar Documents

Publication Publication Date Title
Ayed A conceptual secure blockchain-based electronic voting system
CN110224993B (en) Responsibility pursuing anonymous electronic voting method and system based on block chain
CN109785494B (en) Traceable anonymous electronic voting method based on block chain
Juels et al. Coercion-resistant electronic elections
Chen et al. The design of a secure anonymous internet voting system
AboSamra et al. A practical, secure, and auditable e-voting system
CN110867012A (en) Method, device and system for de-centering electronic voting based on intelligent contract and storage medium
Nguyen Thi et al. Enhanced security in internet voting protocol using blind signatures and dynamic ballots
Gupta et al. Blockchain-based voting system powered by post-quantum cryptography (BBVSP-pqc)
Zhu et al. Anonymous voting scheme for boardroom with blockchain
Carcia et al. Blockchain-based system for e-voting using blind signature protocol
Isirova et al. Decentralized electronic voting system based on blockchain technology developing principals.
CN114240332A (en) Aggregated signature method for electronic voting
CN114978517B (en) Electronic voting method based on intelligent contract and distributed Elgamal algorithm
Khairnar et al. Survey on secure online voting system
Obaidat et al. Protecting the integrity of elections using biometrics
CN112422294B (en) Anonymous voting method and device based on ring signature, electronic equipment and storage medium
Kiayias et al. On the necessity of auditing for election privacy in e-voting systems
Cetinkaya et al. A practical verifiable e-voting protocol for large scale elections over a network
Pan et al. Enhanced name and vote separated E‐voting system: an E‐voting system that ensures voter confidentiality and candidate privacy
Vijayalakshmi et al. Secure online voting system in cloud
CN114677794A (en) Electronic voting method based on block chain
Hussain Danwar et al. A Framework for e-Voting System Based on Blockchain and Distributed Ledger Technologies.
Shaheen et al. A smart card oriented secure electronic voting machine built on NTRU.
Sri et al. E-voting system using blockchain

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