CN116192405A - Electronic voting method and related device - Google Patents

Electronic voting method and related device Download PDF

Info

Publication number
CN116192405A
CN116192405A CN202310190697.2A CN202310190697A CN116192405A CN 116192405 A CN116192405 A CN 116192405A CN 202310190697 A CN202310190697 A CN 202310190697A CN 116192405 A CN116192405 A CN 116192405A
Authority
CN
China
Prior art keywords
voting
ballot
information
verification
target
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.)
Pending
Application number
CN202310190697.2A
Other languages
Chinese (zh)
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.)
Nsfocus Technologies Inc
Nsfocus Technologies Group Co Ltd
Original Assignee
Nsfocus Technologies Inc
Nsfocus Technologies Group Co Ltd
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 Nsfocus Technologies Inc, Nsfocus Technologies Group Co Ltd filed Critical Nsfocus Technologies Inc
Priority to CN202310190697.2A priority Critical patent/CN116192405A/en
Publication of CN116192405A publication Critical patent/CN116192405A/en
Pending legal-status Critical Current

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/3226Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols including means for verifying the identity or authority of a user of the system or for message authentication, e.g. authorization, entity authentication, data integrity or data verification, non-repudiation, key authentication or verification of credentials using a predetermined code, e.g. password, passphrase or PIN
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F21/00Security arrangements for protecting computers, components thereof, programs or data against unauthorised activity
    • G06F21/60Protecting data
    • G06F21/62Protecting access to data via a platform, e.g. using keys or access control rules
    • G06F21/6218Protecting access to data via a platform, e.g. using keys or access control rules to a system of files or objects, e.g. local or distributed file system or database
    • G06F21/6245Protecting personal data, e.g. for financial or medical purposes
    • 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/06Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols the encryption apparatus using shift registers or memories for block-wise or stream coding, e.g. DES systems or RC4; Hash functions; Pseudorandom sequence generators
    • H04L9/0643Hash functions, e.g. MD5, SHA, HMAC or f9 MAC
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L9/00Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols
    • H04L9/08Key distribution or management, e.g. generation, sharing or updating, of cryptographic keys or passwords
    • H04L9/0861Generation of secret information including derivation or calculation of cryptographic keys or passwords
    • H04L9/0863Generation of secret information including derivation or calculation of cryptographic keys or passwords involving passwords or one-time passwords
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L9/00Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols
    • H04L9/08Key distribution or management, e.g. generation, sharing or updating, of cryptographic keys or passwords
    • H04L9/0861Generation of secret information including derivation or calculation of cryptographic keys or passwords
    • H04L9/0869Generation of secret information including derivation or calculation of cryptographic keys or passwords involving random numbers or seeds

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Security & Cryptography (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Theoretical Computer Science (AREA)
  • Health & Medical Sciences (AREA)
  • Bioethics (AREA)
  • General Health & Medical Sciences (AREA)
  • Medical Informatics (AREA)
  • Databases & Information Systems (AREA)
  • Computer Hardware Design (AREA)
  • Software Systems (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Power Engineering (AREA)
  • Management, Administration, Business Operations System, And Electronic Commerce (AREA)

Abstract

The application discloses an electronic voting method and a related device, and relates to the technical field of information security. In the method, after the intelligent contract issues basic information of a target voting event, voting information sent by a voting object based on the basic information is received, the voting information comprises identification of the voting object and ciphertext corresponding to the target ballot, the intelligent contract is integrated before counting the ballot, firstly, the identification of the voting object is verified based on the identification, after the identification is confirmed to pass, validity verification is carried out on the voting information based on the ballot ciphertext and a preset voting private key, and finally, the ballot information is added to a ballot set after the validity verification is confirmed to pass. By adopting the mode, the intelligent contract is used for replacing a trusted third party organization, single-point operation risk of the third party organization is avoided, the identity of the voting object contained in the ballot information can be protected, and the identification and tracking of malicious participants can be realized.

Description

Electronic voting method and related device
Technical Field
The present disclosure relates to the field of information security technologies, and in particular, to an electronic voting method and a related device.
Background
Electronic voting is a novel voting mode based on cryptography, and compared with traditional paper voting, electronic voting is widely applied to a plurality of fields due to the characteristics of high efficiency, safety, transparency and the like. There are four main types of electronic voting schemes: a hybrid network-based electronic voting scheme, a blind signature-based electronic voting scheme, a secret sharing-based electronic voting scheme, and a homomorphic encryption-based electronic voting scheme.
However, some problems remain unsolved with existing electronic voting schemes:
(1) Safety problem: current electronic voting schemes rely on trusted third parties (e.g., registration authorities, ticketing authorities, etc.) and a centralized server, which increases the operational risk of a single point at the central authority; for example, when a centralized server of a trusted third party is attacked maliciously, voting data and personal information are revealed, so that the operation risk of the voting process is increased.
(2) Privacy problem: in an electronic voting scheme, in order for voting objects to verify their ballot results, it is necessary to display all ballot information in a ballot counting stage, including the voting identity of the voting object, the exact number of ballots obtained by the candidate object, etc., which may lead to privacy leakage of the identity information of the voting object and the candidate object, etc., so that malicious adversaries may easily threaten the voting object to vote in a specific manner, or infer the ballot of the voting object from the complete ballot counting result, resulting in impaired anonymity of the voting system.
(3) Regulatory problems: in order to avoid illegal voting of malicious participants, the identities of all voting objects need to be supervised, for example, when the published voting results do not accord with the actual voting of the voting objects, detection and identification are needed to provide a responsibility-inquiring mechanism, and in order to ensure the identity privacy of all voting objects, the current electronic voting scheme cannot accurately trace the source of voting data, so that the voting supervision task cannot be smoothly executed, and the probability of malicious voting in voting activities is increased.
In view of this, a new electronic voting method is required to address the above problems.
Disclosure of Invention
The application provides an electronic voting method and a related device, which are used for improving the privacy, fairness and verifiability of an electronic voting system.
In a first aspect, an embodiment of the present application provides an electronic voting method, including:
after basic information of a target voting event is released, receiving ballot information sent by a voting object based on the basic information, wherein the ballot information at least comprises identification of the voting object in a block chain and ballot ciphertext, and the ballot ciphertext is obtained by encrypting the target ballot based on a preset voting public key;
Performing identity verification on the voting object based on the identity;
after the authentication is confirmed, the validity of the ballot information is verified based on the ballot ciphertext and a preset voting private key;
after determining that the validation passes, the ballot information is added to the ticketing collection.
Optionally, the voting object has a unique account address in the blockchain, and the identification of the voting object in the blockchain is obtained in the following manner:
sending a preset hash parameter to a voting object, and receiving registration information generated by the voting object after binding an account address and privacy information based on the hash parameter and a registration public key contained in a registration key;
performing registration validity verification on the voting object based on the registration information, and after the registration validity verification is passed, storing the registration information into a database, and recording an access path of the registration information in the database;
an identification is generated based on the access entry address and the access path of the database.
Optionally, authenticating the voting object based on the identification includes:
performing voting qualification verification on the voting object based on the identification and a registration private key contained in the registration key;
After the voting qualification is verified, a binding verification interface is called to carry out privacy verification on the binding relation between the account address and the privacy information, wherein the binding verification interface is a privacy proving parameter which is disclosed and related to the privacy information after the voting object is successfully registered in the target voting activity;
when passing privacy verification, the voting object is judged to pass identity verification.
Optionally, the vote ciphertext is obtained by encrypting the random blinding factor and the target vote based on a preset voting public key, and a published promise value is generated based on the random blinding factor and the target vote; promise value characterization: the voting object promises to complete legal voting in the target voting activity;
then, based on the ballot ciphertext and a preset voting private key, the validity of the ballot information is verified, including:
based on the ballot information, acquiring a promise value associated with the target ballot, and calling a promise verification interface to perform promise validity verification on the promise value, wherein the promise verification interface is a voting proof parameter which is disclosed after the promise value is generated and is related to a random blinding factor and the target ballot;
when the promise value passes promise validity verification, decrypting the ballot ciphertext based on the voting private key to obtain a target ballot and a corresponding random blinding factor;
And carrying out matching verification on the promised value based on the target ballot and the random blinding factor, and judging that the ballot information passes the validity verification after the matching verification is passed.
Optionally, after adding the ballot information to the ticketing collection, the method further includes:
when a preset event termination condition is met, acquiring a ticket set; the ticket counting set comprises: ballot information transmitted by each of the plurality of voting objects in a specified history period;
obtaining a ticket counting result based on the ticket counting set; the ticket counting result comprises: the number of votes obtained by each candidate object in a specified history period;
based on the ticketing result, a public result of the target voting event is obtained.
Optionally, the method further comprises:
and when the identity verification or the validity verification is determined not to pass, judging the target ballot as an invalid ballot, and sending an alarm signal.
In a second aspect, embodiments of the present application further provide an electronic voting apparatus, including:
the processing module is used for receiving the vote information sent by the voting object based on the basic information after the basic information of the target voting activity is issued, wherein the vote information at least comprises the identification of the voting object in the block chain and a vote ciphertext, and the vote ciphertext is obtained by encrypting the target vote based on a preset voting public key;
The identity verification module is used for carrying out identity verification on the voting object based on the identity;
the vote verification module is used for verifying the validity of the vote information based on the vote ciphertext and a preset voting private key after the identity verification is confirmed;
and the statistics module is used for adding the ballot information to the ticket counting set after the validity verification is confirmed.
Optionally, the voting object has a unique account address in the blockchain, and the identification of the voting object in the blockchain is obtained by the processing module in the following manner:
sending a preset hash parameter to a voting object, and receiving registration information generated by the voting object after binding an account address and privacy information based on the hash parameter and a registration public key contained in a registration key;
performing registration validity verification on the voting object based on the registration information, and after the registration validity verification is passed, storing the registration information into a database, and recording an access path of the registration information in the database;
an identification is generated based on the access entry address and the access path of the database.
Optionally, when the voting object is authenticated based on the identification and the preset registration key, the authentication module is used for:
Performing voting qualification verification on the voting object based on the identification and a registration private key contained in the registration key;
after the voting qualification is verified, a binding verification interface is called to carry out privacy verification on the binding relation between the account address and the privacy information, wherein the binding verification interface is a privacy proving parameter which is disclosed and related to the privacy information after the voting object is successfully registered in the target voting activity;
when passing privacy verification, the voting object is judged to pass identity verification.
Optionally, the vote ciphertext is obtained by encrypting the random blinding factor and the target vote based on a preset voting public key, and a published promise value is generated based on the random blinding factor and the target vote; promise value characterization: the voting object promises to complete legal voting in the target voting activity;
the vote verification module is used for verifying the validity of the vote information based on the vote ciphertext and a preset voting private key:
based on the ballot information, acquiring a promise value associated with the target ballot, and calling a promise verification interface to perform promise validity verification on the promise value, wherein the promise verification interface is a voting proof parameter which is disclosed after the promise value is generated and is related to a random blinding factor and the target ballot;
When the promise value passes promise validity verification, decrypting the ballot ciphertext based on the voting private key to obtain a target ballot and a corresponding random blinding factor;
and carrying out matching verification on the promised value based on the target ballot and the random blinding factor, and judging that the ballot information passes the validity verification after the matching verification is passed.
Optionally, after adding the ballot information to the ticketing collection, the statistics module is further configured to:
when a preset event termination condition is met, acquiring a ticket set; the ticket counting set comprises: ballot information transmitted by each of the plurality of voting objects in a specified history period;
obtaining a ticket counting result based on the ticket counting set; the ticket counting result comprises: the number of votes obtained by each candidate object in a specified history period;
based on the ticketing result, a public result of the target voting event is obtained.
Optionally, the identity verification module and the vote verification module are further configured to:
and when the identity verification or the validity verification is determined not to pass, judging the target ballot as an invalid ballot, and sending an alarm signal.
In a third aspect, embodiments of the present application provide an electronic device comprising a memory, a processor and a computer program stored on the memory and executable on the processor, the processor implementing the method according to any one of the first aspects when executing the computer program.
In a fourth aspect, embodiments of the present application provide a computer-readable storage medium having stored thereon a computer program which, when executed by a processor, implements the steps of the method according to any of the first aspects.
In a fifth aspect, embodiments of the present application provide a computer program product which, when invoked by a computer, causes the computer to perform the method according to the first aspect.
In the embodiment of the application, after the intelligent contract issues basic information of a target voting event, vote information sent by a voting object based on the basic information is received, the vote information comprises identification of the voting object and ciphertext corresponding to the target vote, the intelligent contract is approximately before counting the votes, firstly, the identification verification is carried out on the voting object based on the identification and a preset registration key, after the identification verification is confirmed, validity verification is carried out on the vote information based on the vote ciphertext and a preset voting private key, and finally, the vote information is added to a vote set after the validity verification is confirmed.
In this way, intelligent contracts are used to replace trusted third party institutions, qualification examination of voting objects is completed, centerless applications are used to store user sensitive identity information, single-point operation risks of the third party institutions are avoided, fairness of a voting scheme is guaranteed, in addition, the voting information only contains identification of the voting objects and does not contain true identities of the voting objects, identity information of the voting objects cannot be revealed in the identity verification process, user privacy is protected, meanwhile, the identification and the privacy information are bound, identification and tracking of malicious participants can be achieved, and probability of malicious voting in voting is reduced.
Drawings
FIG. 1 is a schematic diagram of a system architecture according to an embodiment of the present application;
FIG. 2 is a detailed flow chart of electronic voting under the system architecture in the embodiment of the present application;
FIG. 3 is a detailed flowchart of generating identity credentials under a system architecture in an embodiment of the present application;
fig. 4 is a schematic diagram of a scenario of a witch attack provided in an embodiment of the present application;
fig. 5 is a logic diagram of obtaining a vote ciphertext according to an embodiment of the present application;
FIG. 6 is a detailed flow chart of authentication of a voting object in an embodiment of the present application;
FIG. 7 is a logic diagram of a zero knowledge proof verification provided in an embodiment of the present application;
FIG. 8 is a detailed flowchart of validating vote information in an embodiment of the present application;
FIG. 9 is a detailed flow chart of the disclosed results obtained in the embodiments of the present application;
FIG. 10 is a schematic diagram of the logic of a ticket collection in an embodiment of the present application;
FIG. 11 is a logic diagram of a ticket counting result in an embodiment of the present application;
fig. 12 is a schematic structural diagram of an electronic voting device according to an embodiment of the present application;
fig. 13 is a schematic structural diagram of an electronic device in an embodiment of the present application.
Detailed Description
For the purposes of making the objects, technical solutions and advantages of the embodiments of the present application more clear, the technical solutions of the present application will be clearly and completely described below with reference to the drawings in the embodiments of the present application, and it is apparent that the described embodiments are some embodiments of the technical solutions of the present application, but not all embodiments. All other embodiments, which can be made by a person of ordinary skill in the art without any inventive effort, based on the embodiments described in the present application are intended to be within the scope of the technical solutions of the present application.
Some of the terms in the embodiments of the present application are explained below to facilitate understanding by those skilled in the art.
(1) Chameleon Hash (CH): the collision of the chameleon Hash function can be easily calculated by a user knowing the trapdoor, and the function consists of a parameter generation algorithm Setup, a key generation algorithm KeyGen, a Hash value generation algorithm Hash and a collision calculation algorithm Forge.
(2) Non-interactive zero-knowledgepro fs (NIZKs): on the premise that specific information is not revealed, the prover is led to trust that a certain judgment is true, the prover only creates one proof, all verifiers holding the proof can Verify, and the non-interactive zero knowledge proof protocol consists of an initialization Setup, a proof generation algorithm Prove and a verification algorithm verity.
(3) Promise scheme: refers to the verifier verifying data sent by the committee without knowing the private data. The promise scheme has two basic properties of hiding property and binding property, wherein the hiding property provides privacy protection for data, and the binding property provides reliability guarantee for data supervision. The scheme consists of three stages (initialization stage Setup, commitment stage Com, open stage Open), and the commitment scheme used in the embodiment of the application is petersen commitment with addition homomorphism.
(4) Ticket counting hiding: the protocol ensures that no more information (e.g., intermediate results, number of votes, etc.) is revealed than the necessary final voting results, and that the adversary cannot obtain more information about the choice of voting object from the published results.
(5) Voting result function: depending on the voting method and the number of votes given for each candidate object, the outcome function returns the final result of the election without revealing any unnecessary information to implement an electronic voting system with vote hiding features.
(6) Intelligent contract: is a program running on the blockchain, and is automatically executed when a predetermined condition is met, and cannot be manually interfered. The intelligent contract can replace the task of the traditional electronic voting center node as a trusted computing participant, and the trust and single point failure problems are solved.
The following briefly describes the design concept of the embodiment of the present application:
conventional electronic voting systems display not only the voting results, but also the complete ballot results, including the exact number of votes per candidate, which may lead to privacy leakage problems for the voter and the candidate, e.g., in multiple rounds of voting, intermediate ballot results should not be disclosed except for the information that the candidate entered into the resolution, which may otherwise affect the voter's intent to vote in the next round.
Further, in many current electronic voting schemes based on blockchains, only the blockchain is used as a bulletin board to disclose the ballot information, the voting and ballot counting processes still depend on trusted third party institutions such as a registry, a ballot counting center and the like, and the third party institutions may have fraud (discarding part of ballots obtained by single candidates and the like) behaviors, so that the final winning result of the candidate is not true, and when a centralized server of the trusted third party is under malicious attack, risks of leakage of voting data and personal information are caused, so that the voting fairness problem is not solved, and a centralized threat exists.
In addition, in order to monitor the correct execution of the votes, the probability of malicious votes in the voting activity is reduced, the authenticity of the voting results needs to be verified, and the traceability tracking of the data on the block chain is realized.
Therefore, in the embodiment of the application, the verifiable blockchain electronic voting method with enhanced privacy is provided mainly for solving the problems of low privacy, centralization, insufficient blockchain supervision and the like in the prior art.
The scheme provided by the embodiment of the application utilizes the blockchain technology to realize large-scale multiparty data collaboration under the condition of lacking a trusted third party, solves the problem of trust and data ownership in the electronic voting process, combines Pedersen promise and zero knowledge proof to hide data, protects user data privacy, establishes the binding relationship between voter privacy information and voting identity by utilizing the special attribute of chameleon hash, realizes tracing the voting data, and completes supervision tasks.
The preferred embodiments of the present application will be described below with reference to the accompanying drawings of the specification, it being understood that the preferred embodiments described herein are for illustration and explanation only, and are not intended to limit the present application, and the embodiments of the present application and the features of the embodiments may be combined with each other without conflict.
Referring to fig. 1, in the embodiment of the present application, four main parts are included, namely an intelligent contract 100, a voting initiating object 101, a voting object 102 and a time server 103, wherein the voting initiating object 101 is responsible for initializing a system, setting related parameters of an activity, publishing the intelligent contract 100 and deploying the intelligent contract into a blockchain network, the voting object 102 registers through the intelligent contract 100, obtaining voting qualification, and calling related interfaces of the intelligent contract 100 to complete voting operation, and the time server 103 is used for synchronizing each voting participation node and is mainly responsible for monitoring the starting time and the deadline of a voting activity.
The intelligent contract 100 is a program running on a blockchain, and is a set of codes and data like other programs, the voting initiating object 101 writes corresponding contracts such as registration, voting and counting according to the requirement of a target voting activity to form the intelligent contract 100, the intelligent contract 100 cannot be modified after being deployed on the blockchain network, when preset conditions are met, the intelligent contract 100 can be automatically and accurately executed according to the written codes, and the voting object 101 can call functions in the intelligent contract 100 to participate in the whole voting process.
Based on the above system architecture, referring to fig. 2, the electronic voting method in the embodiment of the present application mainly includes the following steps:
step 201: and after the basic information of the target voting activity is released, receiving the ballot information sent by the voting object based on the basic information.
Specifically, in the embodiment of the present application, the release of the target voting campaign is based on the deployment of the intelligent contracts on the blockchain, so before that, the voting initiating object needs to write contracts such as registration, voting, and counting included in the intelligent contracts according to the requirements of the target voting campaign, set parameters related to identity verification and voting, and generate initial parameters such as non-interactive zero-knowledge proof and chameleon hash algorithm.
For example, the voting sponsor first generates system public security parameters and publicly discloses, including but not limited to registering a contract public-private key pair (pk reg ,sk reg ) The security parameter lambda of the chameleon hash algorithm, the proof key pair (pk of non-interactive zero knowledge proof zk ,vk zk ) Voting public-private key pair (pk vot ,sk vot ) Deposit payment address Addr dep Selecting two homomorphic commitment related parameters of random generating elements with the order of large prime number q and G and h as G, further deploying contracts such as registration, voting, counting and the like on a blockchain, and setting registration start time and registration deadline { T } regS ,T regE }。
Further, interfaces such as a rule description function and a voting function are defined in the intelligent contract, the voting object can know relevant information of the voting activity, including globally unique voting numbers, voting titles, voting requirements and the like by calling the rule description function, and voting can be completed by calling the voting function.
In practical application, the voting system is various, and can be classified into a binary voting system, a sequencing voting system, a scoring voting system and the like from the viewpoint of the voting form, and can be classified into a single winner and a multi-winner from the viewpoint of the voting result, and the voting initiating object deploys corresponding voting contracts according to own requirements.
In the embodiment of the application, the vote number is defined as vote id The voting topic is vote des Voting start time and voting deadline { T ] voteS ,T voteE Voting set
Figure SMS_1
Wherein n is option Represents the number of candidates, n vpc Representing the number of votes each candidate is allowed to obtain from a single voter, e.g. n, taking the most widely used binary voting formulation in life as an example vpc Number of candidates n =1 option =4, then the voting set c= { (a, b, C, d) |a, b, C, d e {0,1 }.
After the voting object obtains the basic information of the target voting activity, the voting object needs to register the deadline T regE Before finishing registration, obtaining voting qualification, then selecting according to own wish, calling voting function, at voting deadline T voteE And uploading the ballot information of the user.
Specifically, in the embodiment of the present application, the vote information at least includes identification of the voting object in the blockchain and a vote ciphertext, where the vote ciphertext is based on the voting public key pk vot And encrypting the target vote to obtain the target vote.
Referring to FIG. 3, the identification of voting objects in the blockchain is obtained in the following manner:
step 301: and sending the preset hash parameters to the voting object, and receiving registration information generated by the voting object after binding the account address and the privacy information based on the hash parameters and the registration public key contained in the registration key.
In the blockchain, the user can directly create own account address id i The account address is account information irrelevant to real identity information, the anonymity of the account address protects user privacy to a certain extent, but an attacker can increase false identities to conduct malicious voting through Sybil attacks, and referring to FIG. 4, the attacker occupies higher voting rights in voting by controlling a large number of false identities, so that the attacker can possibly change the real voting results, and the purpose of attack is achieved. Therefore, before voting, the voting object needs to register, and a binding relation between the account address and the privacy information is established, so that the true identity is checked by using a registration contract in the voting process.
In the voting registration phase, the voting object is according toGenerating user key pairs by chameleon hash parameter lambda
Figure SMS_2
Then calculate the account address id i Corresponding chameleon hash value
Figure SMS_3
Wherein r is a random number. At the same time, a zero knowledge proof pi is generated for the following relationship inf
Figure SMS_4
Figure SMS_5
π inf ←Prove(pk zk ,x,w)
And uses the registration public key pk reg Proof of zero knowledge pi inf The public information x in the file is encrypted to obtain ciphertext C of x inf Send registration information reg info =(C infinf ) To a smart contract.
Specifically, in the blockchain, the user has private information priv representing his identity i What is disclosed to the outside is the account address id which is irrelevant to the identity and protects the privacy of the user i In the embodiment of the application, when the voting object creates registration information, the special attribute of the chameleon hash is utilized to establish the binding relation between the privacy information of the voting object and the account address, and firstly the voting object finds the collision trapdoor r' ≡force (id) of the chameleon hash i ,priv i R), then the chameleon hash value
Figure SMS_6
Step 302: and carrying out registration validity verification on the voting object based on the registration information, and after the registration validity verification is passed, storing the registration information into a database, and recording the access path of the registration information in the database.
Smart contract enablesWith registration private key sk reg For C inf Decrypting to obtain zero knowledge proof pi inf Disclosure information in (a)
Figure SMS_7
Verifying account address id of voting object i Whether the block chain address format is met or not, and proving pi to zero knowledge by using a verification algorithm Verify corresponding to a proof generating algorithm save in a non-interactive zero knowledge proving protocol inf And (5) performing verification.
Optionally, the method further includes screening the identity of the voting object to determine whether the voting object has an initial voting qualification, for example, if the voting activity only allows the staff in a company to participate, and the identity of the voting object is a department staff of the company, the voting object has the initial voting qualification.
Further, when the intelligent contract verifies the account address id of the voting object i Conforming to the block chain address format and proving pi by zero knowledge inf After passing the verification, storing
Figure SMS_8
To the voter list and add
Figure SMS_9
To the blockchain merck tree MT (space saving, convenient query), to the registration deadline T regE When registration is finished, the intelligent contract broadcasts and shows the Merck tree MT in the blockchain network, the Merck tree MT can be regarded as a certificate for proving the validity of the user, and only the user information which accords with voting qualification is +. >
Figure SMS_10
Will appear at the leaf node of the MT and the voting object determines if it acquired the voting qualification by querying. />
Step 303: an identification is generated based on the access entry address and the access path of the database.
Specifically, after the voting object generates registration information, zero knowledge proof pi is also generated for the following relation proof
x=(rt,pk reg ,C id ),
Figure SMS_11
π proof ←Prove(pk zk ,x,w)
Wherein rt, path id The root hash value of the merck tree MT and the access path of the registration information of the voting object in the merck tree are respectively C id Is to use the registered public key pk reg Hash public key for chameleon
Figure SMS_12
The ciphertext obtained after encryption finally obtains the identification +.>
Figure SMS_13
Figure SMS_14
Optionally, in this embodiment of the present application, after the voting object is successfully registered, the voting object needs to be further registered to the address Addr dep Deposit is paid, the disfigurement cost is further increased through a deposit mechanism, the voting objects are forced to push the protocol to be executed correctly, and the safety and fairness of the electronic voting system are guaranteed.
Further, the voting object votes according to own will, generates a corresponding target ballot, introduces a random blinding factor, binds the target ballot based on the Pedersen promise, and obtains a promise value.
For example, the target votes of the voting objects are:
Figure SMS_15
randomly selecting an integer as a random blinding factor r, and generating corresponding promise values for votes of each candidate for voting objects based on the Pedersen promise, namely:
c j =Com(m j ,r j )=g*m j +h*r j ,1≤j≤n option
Wherein the j-th commitment value represents a ballot commitment of the voting object to the j-th candidate, and characterizes that the voting object commitment completes legal voting in the target voting activity.
Optionally, to reduce the constraint size of commitments in zero knowledge proof, vector commitments may be used to perform performance optimization, thereby improving computational efficiency.
To prove c i The homomorphic promise of the target ballot is realized, and the target ballot ch is in the voting set C, so that the voting format is satisfied, and the voting object generates zero knowledge proof for the following relation:
x=(c i =Com(ch,r)∧ch∈C),
Figure SMS_16
π vote ←Prove(pk zk ,x,w)
in order to ensure the privacy of the target vote, referring to fig. 5, the voting object uses the voting public key pk vot Encrypting the target ballot and the random blinding factor to obtain a ballot ciphertext e i
Figure SMS_17
Finally, the voting object sends the ballot information of the voting object in the form of transaction
Figure SMS_18
To a smart contract.
Based on the step 201, the vote information sent by the voting object only includes the identification of the voting object, and does not include the privacy information, so that the privacy of the voting object is well protected, and when the vote information is uploaded, the target vote is encrypted by using a public key encryption algorithm, so that the key information can be effectively prevented from being snooped by a third party, and meanwhile, the non-falsification of the block chain ensures that any person cannot modify and delete after all the vote information is sent to the intelligent contract, and the scheme integrity is ensured.
In addition, the scheme uses a cryptographic commitment scheme, under the condition that any private data plaintext is not disclosed, sensitive information in commitment is proved to meet a certain constraint relation to a third party, the self-contained addition homomorphism of the commitment is utilized, the proving function of obtaining the constraint relation is matched with zero knowledge proving, the third party verification of data relevance in the voting process is provided, the scheme is lighter, and the performance and the application range of the system are improved.
Step 202: the voted object is authenticated based on the identification.
Specifically, when the target voting campaign reaches the voting deadline T voteE Then, the intelligent contract no longer receives any vote information, and the participants who do not vote within the deadline are regarded as the override, and the corresponding voting nodes automatically generate the override vote.
The counting contract automatically triggers the checking and counting of all ballot information, wherein referring to fig. 6, the identity of the voting object is verified by the following method:
step 2021: voting qualification verification is performed on the voting object based on the identification and a registration private key included in the registration key.
For example, resolving identity certificates contained in ballot information
Figure SMS_19
Obtain (rt, pk) reg ,C id ) Using the registration private key sk reg For C id Decrypting to obtain the chameleon hash public key corresponding to the voting object>
Figure SMS_20
Judging whether the information exists in the voter list, if so, judging that the voting object passes the voting qualification verification.
Step 2022: and after the voting qualification verification is passed, calling a binding verification interface to carry out privacy verification on the binding relation between the account address and the privacy information.
The binding verification interface is a privacy proving parameter related to privacy information, which is disclosed after the voting object is successfully registered in the target voting activity.
Specifically, in the embodiment of the present application, the binding verification interface is the zero knowledge proof pi described above proof Referring to fig. 7, the smart contract is used as a verifier, and a verification algorithm Verify corresponding to a proof generation algorithm save in a non-interactive zero knowledge proof protocol is used to Prove pi to zero knowledge published as a voting object of the prover proof Performing verification, i.e.
0/1←Verify(vk zk ,x,π proof ),
Wherein x= (rt, pk) reg ,C id ) If the algorithm output result is 1, characterizing zero knowledge to prove pi proof Hidden information in (a)
Figure SMS_21
True, indicating account address id i Private information priv i Binding is successful, and repeated voting behaviors do not exist for the voting objects.
Step 2023: and when passing privacy verification, determining that the voting object passes the identity verification.
If the registration information of the voting object can be found in the voting list and the binding verification interface provided by the voting object is successfully verified, the voting object is judged to pass the identity verification.
Step 203: after the authentication is confirmed, the validity of the ballot information is verified based on the ballot ciphertext and the voting private key.
Further, referring to fig. 8, in the embodiment of the present application, validity verification is performed on the vote information in the following manner:
step 2031: based on the ballot information, obtaining a promise value associated with the target ballot, and calling a promise verification interface to perform promise validity verification on the promise value.
The promise verification interface is disclosed after the promise value is generated, and the promise verification interface is related to the random blinding factors and the voting proof parameters of the target ballots.
In particular, the embodiment of the applicationIn the method, the promise verification interface is zero knowledge proof pi as described above vote Similarly, the smart contract is used as a verifier, and a verification algorithm Verify corresponding to the proof generating algorithm save is used as a non-interactive zero knowledge proof pi for the proof of zero knowledge published to the voting object as a prover vote Performing verification, i.e.
0/1←Verify(vk zk ,x,π vote ),
Wherein x= (c) i =com (ch, r) ∈c), if the algorithm output result is 1, then the zero knowledge proof pi is represented vote Hidden information in (a)
Figure SMS_22
True, indicating the target vote ch and the promise value c i There is a specified constraint relation between them, and the target ballot ch accords with a preset voting rule, i.e. ch is in the voting set C.
Step 2032: when the promise value passes promise validity verification, judging that a target vote contained in the vote ciphertext accords with a preset voting rule, and decrypting the vote ciphertext based on a voting private key to obtain the target vote and a corresponding random blinding factor.
After determining that the target vote meets the preset voting rule, the voting private key sk can be used vot For the ballot ciphertext e i Decrypting to obtain the specific content of the target vote and the corresponding random blinding factor, namely
Figure SMS_23
Step 2033: and carrying out matching verification on the promised value based on the target ballot and the random blinding factor, and judging that the ballot information passes the validity verification after the matching verification is passed.
Specifically, the Open phase algorithm Open corresponding to the commitment phase algorithm Com in the commitment scheme is used to perform matching verification on the commitment value, namely
0/1←Open(c j ,m j ,r j ),
And when the algorithm output is 1, successfully matching the promise value obtained by representing the calculation of the intelligent contract with the promise value disclosed by the voting object, namely indicating that the target ballot contained in the ballot ciphertext is not tampered secondarily in the process of uploading the ballot ciphertext to the intelligent contract.
Based on the steps 202 and 203, combining the promise scheme and the zero knowledge proof, not only realizing the hiding of the data, but also providing a reliable verification means to the outside, and by verifying the correctness of the counting process, especially the correctness of the zero knowledge proof, the owner can establish the trust of the voting activity and the voting result, thus realizing a provable and verifiable electronic voting system.
Step 204: after determining that the validation passes, the ballot information is added to the ticketing collection.
In the embodiment of the application, after the ticket information passes the validity verification, the ticket information is added to the ticket counting set, namely only the ticket information which passes all the verification is counted.
Further, referring to fig. 9, the flow of intelligent contract statistics legal votes is as follows:
step 901: and when the preset event termination condition is met, obtaining a ticket collection.
Wherein, the ticket counting set comprises: the plurality of voting objects each transmit ballot information in a specified history period.
For example, the time server records that the duration of the current target voting event reaches the voting deadline T voteE And when all vote information is verified, the intelligent contract obtains a complete vote set, see fig. 10, which contains a complete vote set consisting of a plurality of votes for a vote deadline T voteE Previously transmitted ballot information after verification, wherein, taking ballot information 1 as an example, the ballot information comprises promise value c corresponding to the target ballot of the voting object 1 1 Ciphertext e of ballot 1 Proof of zero knowledge pi vote And identification of the voting object 1
Figure SMS_24
Step 902: and obtaining a ticket counting result based on the ticket counting set.
Wherein, the ticket counting result comprises: the number of votes obtained for each candidate in a specified history period.
Specifically, in the embodiment of the present application, when the vote counting contract gathers all the vote information, the voting private key sk is first utilized vot Decrypting the ballot ciphertext ei contained in each ballot information to obtain a target ballot of each voting object and a corresponding random blinding factor thereof:
Figure SMS_25
referring to FIG. 11, for each candidate 1. Ltoreq.j.ltoreq.n option The counting contract aggregates the total number of votes obtained by all candidates and the corresponding random blinding factors to obtain a final counting result:
Figure SMS_26
wherein n is t For the number of valid votes, n is assumed to be submitted by all voting objects t I.e. the number of people who are voting targets,
Figure SMS_27
representing the total number of votes obtained by the j-th candidate.
The counting contract is based on the additive homomorphism characteristics of the Pedersen promise
Figure SMS_28
Aggregate all ballot commitments +.>
Figure SMS_29
1≤j≤n option For the total promise value corresponding to all votes obtained by each candidate, using the com algorithm in promise scheme to make promise verification, i.e. +.>
Figure SMS_30
Figure SMS_31
Step 903: based on the ticketing result, a public result of the target voting event is obtained.
Optionally, in the embodiment of the present application, in order to implement a voting system for vote hiding, the smart contract uses a preset result function f tally Calculating the voting results finally used for external publicity, i.e. res+.f tally (T) no additional information is revealed other than the information selected by the result function.
For example, in a single choice vote, where one is only interested in the winner, the outcome function f tally Only the highest candidate to be ticketed is returned.
Meanwhile, the intelligent contract defines rich result functions f for different voting methods tally Thus achieving desirable privacy results, such as publishing a complete candidate ranking, ranking the best or worst k candidate sets, obtaining winners in at least 50% vote conditions, etc., the definition of the outcome function is not limited by the embodiments of the present application.
In addition, to satisfy the verifiability of electronic votes, the voting object is enabled to verify whether all votes were counted correctly in the counting phase, and the counting contract also generates a zero knowledge proof for the following relationship:
Figure SMS_32
Figure SMS_33
π tally ←Prove(pk zk ,x,w)
Finally, the vote counting publishes the voting result res and the zero knowledge proof (x, pi) tally ) At the same time, the intelligent contract returns the deposit to the honest participating voting object.
Based on the step 204, the final voting result is published by using the result function instead of the voting result, so that the voting result is hidden, a malicious attacker can be prevented from deducing the target ballot of the voting object from the voting result, the ballot buying and selling is avoided to a certain extent, the possibility of the voting object being stressed is reduced, the safety and privacy of the voting system are enhanced, meanwhile, the completeness and reliability of the voting result are guaranteed by using zero knowledge proof, and the verifiability of the scheme is provided.
In an alternative embodiment, upon determining that authentication or validation fails, the intelligent contract determines the target vote as an invalid vote and sends an alert signal that a voting originator is reported that a voting object may have malicious voting activity, while the intelligent contract needs the vote ciphertext e of the invalid vote i Generates a zero knowledge proof indicating to the outside that the decision that the ballot is an invalid ballot is a correct decision to make if verified.
Further, for voting objects with malicious voting behaviors, identification of voting objects in voting can be passed
Figure SMS_34
Decryption C id Obtain color change Long Gong key corresponding to voting object>
Figure SMS_35
By means of information stored in the voter list +.>
Figure SMS_36
Searching for a corresponding account address id i Thereby identifying individuals or organizations that are behaving endlessly.
In summary, the scheme uses the automatic executability of the intelligent contract to realize the processes of identity verification, registration, voting, counting and the like, no other trusted third party mechanisms exist, the intelligent contract starts to automatically execute when meeting specific conditions through the synchronous function of the time server, and only effective operations before the expiration time are processed, such as registration, voting and the like, whether the comparison operation time is the same as the set time or not is judged as illegal operations if the comparison operation time is different from the set time, and the subsequent stages are not counted.
Meanwhile, encryption and homomorphic promise are used for guaranteeing the confidentiality of the ballots, voting objects can only know the ballot results of the ballots, the middle ballot counting results of voting activities cannot be obtained, fairness of voting schemes is guaranteed, furthermore, the addition of the wrongful cost by using a deposit mechanism can force participants to correctly execute a system protocol, a voting initiator can also calculate according to identity evidence in ballot information, identity tracking is conducted on voting objects executing malicious voting behaviors, otherwise, the existence of the identity evidence can enable the scheme to monitor whether the voting initiator has dishonest behaviors, and the fairness and effectiveness of a voting system are further guaranteed.
Based on the same technical concept, referring to fig. 12, an embodiment of the present application further provides an electronic voting device, where the electronic voting device includes:
the processing module 1201 is configured to receive, after publishing basic information of a target voting campaign, vote information sent by a voting object based on the basic information, where the vote information at least includes an identification of the voting object in a blockchain and a vote ciphertext, and the vote ciphertext is obtained by encrypting the target vote based on a preset voting public key;
an identity verification module 1202 for verifying the identity of the voting object based on the identity;
the vote verification module 1203 is configured to verify validity of the vote information based on the vote ciphertext and a preset voting private key after determining that the identity verification is passed;
and the statistics module 1204 is used for adding the ballot information to the ticket counting set after the validation is confirmed to pass.
Optionally, the voting object has a unique account address in the blockchain, and the identification of the voting object in the blockchain is obtained by the processing module 1201 in the following manner:
sending a preset hash parameter to a voting object, and receiving registration information generated by the voting object after binding an account address and privacy information based on the hash parameter and a registration public key contained in a registration key;
Performing registration validity verification on the voting object based on the registration information, and after the registration validity verification is passed, storing the registration information into a database, and recording an access path of the registration information in the database;
an identification is generated based on the access entry address and the access path of the database.
Optionally, when authenticating the voting object based on the identification, the authentication module 1202 is configured to:
performing voting qualification verification on the voting object based on the identification and a registration private key contained in the registration key;
after the voting qualification is verified, a binding verification interface is called to carry out privacy verification on the binding relation between the account address and the privacy information, wherein the binding verification interface is a privacy proving parameter which is disclosed and related to the privacy information after the voting object is successfully registered in the target voting activity;
when passing privacy verification, the voting object is judged to pass identity verification.
Optionally, the vote ciphertext is obtained by encrypting the random blinding factor and the target vote based on a preset voting public key, and a published promise value is generated based on the random blinding factor and the target vote; promise value characterization: the voting object promises to complete legal voting in the target voting activity;
The vote verification module 1203 is configured to, when verifying the validity of the vote information based on the vote ciphertext and the preset voting private key:
based on the ballot information, acquiring a promise value associated with the target ballot, and calling a promise verification interface to perform promise validity verification on the promise value, wherein the promise verification interface is a voting proof parameter which is disclosed after the promise value is generated and is related to a random blinding factor and the target ballot;
when the promise value passes promise validity verification, decrypting the ballot ciphertext based on the voting private key to obtain a target ballot and a corresponding random blinding factor;
and carrying out matching verification on the promised value based on the target ballot and the random blinding factor, and judging that the ballot information passes the validity verification after the matching verification is passed.
Optionally, after adding the ballot information to the ticketing collection, the statistics module 1204 is further configured to:
when a preset event termination condition is met, acquiring a ticket set; the ticket counting set comprises: ballot information transmitted by each of the plurality of voting objects in a specified history period;
obtaining a ticket counting result based on the ticket counting set; the ticket counting result comprises: the number of votes obtained by each candidate object in a specified history period;
Based on the ticketing result, a public result of the target voting event is obtained.
Optionally, the identity verification module 1202 and the vote verification module 1203 are further configured to:
and when the identity verification or the validity verification is determined not to pass, judging the target ballot as an invalid ballot, and sending an alarm signal.
Based on the same technical concept, the embodiment of the application also provides electronic equipment, and the electronic equipment can realize the electronic voting method provided by the embodiment of the application.
In one embodiment, the electronic device may be a server, a terminal device, or other electronic device.
Referring to fig. 13, the electronic device may include:
the present embodiment of the present application does not limit a specific connection medium between the processor 1301 and the memory 1302, and in fig. 13, the processor 1301 and the memory 1302 are exemplified by a bus 1300. Bus 1300 is shown in bold lines in fig. 13, and the manner in which the other components are connected is merely illustrative and not limiting. The bus 1300 may be divided into an address bus, a data bus, a control bus, etc., and is shown with only one thick line in fig. 13 for convenience of illustration, but does not represent only one bus or one type of bus. Alternatively, processor 1301 may be referred to as a controller, with no limitation on the name.
In this embodiment, the memory 1302 stores instructions executable by the at least one processor 1301, and the at least one processor 1301 can perform an electronic voting method as discussed above by executing the instructions stored by the memory 1302. Processor 1301 may implement the functions of the various modules in the apparatus shown in fig. 12.
The processor 1301 is a control center of the apparatus, and may connect various parts of the entire control apparatus using various interfaces and lines, and perform overall monitoring of the apparatus by executing or executing instructions stored in the memory 1302 and calling data stored in the memory 1302, various functions of the apparatus, and processing data.
In one possible design, processor 1301 may include one or more processing units, and processor 1301 may integrate an application processor and a modem processor, where the application processor primarily processes operating systems, user interfaces, application programs, and the like, and the modem processor primarily processes wireless communications. It will be appreciated that the modem processor described above may not be integrated into the processor 1301. In some embodiments, processor 1301 and memory 1302 may be implemented on the same chip, and in some embodiments they may be implemented separately on separate chips.
Processor 1301 may be a general purpose processor such as a CPU, digital signal processor, application specific integrated circuit, field programmable gate array or other programmable logic device, discrete gate or transistor logic device, discrete hardware components, that may implement or perform the methods, steps, and logic blocks disclosed in embodiments of the present application. The general purpose processor may be a microprocessor or any conventional processor or the like. The steps of an electronic voting method disclosed in connection with the embodiments of the present application may be embodied directly in a hardware processor for execution, or in a combination of hardware and software modules in the processor.
The memory 1302, which is a non-volatile computer-readable storage medium, may be used to store non-volatile software programs, non-volatile computer-executable programs, and modules. The Memory 1302 may include at least one type of storage medium, which may include, for example, flash Memory, hard disk, multimedia card, card Memory, random access Memory (Random Access Memory, RAM), static random access Memory (Static Random Access Memory, SRAM), programmable Read-Only Memory (Programmable Read Only Memory, PROM), read-Only Memory (ROM), charged erasable programmable Read-Only Memory (Electrically Erasable Programmable Read-Only Memory), magnetic Memory, magnetic disk, optical disk, and the like. Memory 1302 is any other medium that can be used to carry or store desired program code in the form of instructions or data structures and that can be accessed by a computer, but is not limited to such. The memory 1302 in the present embodiment may also be circuitry or any other device capable of implementing a memory function for storing program instructions and/or data.
By programming the processor 1301, the code corresponding to one of the electronic voting methods described in the previous embodiments may be solidified into a chip, thereby enabling the chip to perform the steps of one of the electronic voting methods of the embodiment shown in fig. 2 at run-time. How to design and program the processor 1301 is a technique well known to those skilled in the art, and will not be described in detail herein.
Based on the same inventive concept, embodiments of the present application also provide a storage medium storing computer instructions that, when executed on a computer, cause the computer to perform an electronic voting method as previously discussed.
In some possible embodiments, aspects of an electronic voting method may also be implemented in the form of a program product comprising program code for causing a control apparatus to carry out the steps of an electronic voting method according to the various exemplary embodiments of the application described herein above when the program product is run on an apparatus.
It should be noted that although several units or sub-units of the apparatus are mentioned in the above detailed description, such a division is merely exemplary and not mandatory. Indeed, the features and functions of two or more of the elements described above may be embodied in one element in accordance with embodiments of the present application. Conversely, the features and functions of one unit described above may be further divided into a plurality of units to be embodied.
Furthermore, although the operations of the methods of the present application are depicted in the drawings in a particular order, this is not required to or suggested that these operations must be performed in this particular order or that all of the illustrated operations must be performed in order to achieve desirable results. Additionally or alternatively, certain steps may be omitted, multiple steps combined into one step to perform, and/or one step decomposed into multiple steps to perform.
It will be appreciated by those skilled in the art that embodiments of the present application may be provided as a method, system, or computer program product. Accordingly, the present application may take the form of an entirely hardware embodiment, an entirely software embodiment, or an embodiment combining software and hardware aspects. Furthermore, the present application may take the form of a computer program product embodied on one or more computer-usable storage media (including, but not limited to, disk storage, CD-ROM, optical storage, and the like) having computer-usable program code embodied therein.
The present application is described with reference to flowchart illustrations and/or block diagrams of methods, apparatus (systems) and computer program products according to the application. It will be understood that each flow and/or block of the flowchart illustrations and/or block diagrams, and combinations of flows and/or blocks in the flowchart illustrations and/or block diagrams, can be implemented by computer program instructions. These computer program instructions may be provided to a processor of a general purpose computer, special purpose computer, embedded processor, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, create means for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be stored in a computer-readable memory that can direct a computer or other programmable data processing apparatus to function in a particular manner, such that the instructions stored in the computer-readable memory produce an article of manufacture including instruction means which implement the function specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be loaded onto a computer or other programmable data processing apparatus to cause a series of operational steps to be performed on the computer or other programmable apparatus to produce a computer implemented process such that the instructions which execute on the computer or other programmable apparatus provide steps for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
It will be apparent to those skilled in the art that various modifications and variations can be made in the present application without departing from the spirit or scope of the application. Thus, if such modifications and variations of the present application fall within the scope of the claims and the equivalents thereof, the present application is intended to cover such modifications and variations.

Claims (10)

1. A method of electronic voting performed by intelligent contracts of a blockchain, comprising:
after basic information of a target voting activity is released, receiving ballot information sent by a voting object based on the basic information, wherein the ballot information at least comprises identification and ballot ciphertext of the voting object in a block chain, and the ballot ciphertext is obtained by encrypting the target ballot based on a preset voting public key;
performing identity verification on the voting object based on the identity;
after the identity verification is confirmed, carrying out validity verification on the ballot information based on the ballot ciphertext and a preset voting private key;
after determining that the validity verification is passed, adding the ballot information to a ticketing collection.
2. The method of claim 1, wherein the voting object has a unique account address in the blockchain, and the identification of the voting object in the blockchain is obtained by:
sending a preset hash parameter to the voting object, and receiving registration information generated by the voting object after binding the account address and the privacy information based on the hash parameter and a registration public key contained in the registration key;
Performing registration validity verification on the voting object based on the registration information, and after the registration validity verification is passed, storing the registration information into a database, and recording an access path of the registration information in the database;
the identification is generated based on the access entry address of the database and the access path.
3. The method of claim 2, wherein said authenticating the voting object based on the identification comprises:
performing voting qualification verification on the voting object based on the identification and a registration private key contained in the registration key;
after passing the voting qualification verification, calling a binding verification interface to carry out privacy verification on the binding relation between the account address and the privacy information, wherein the binding verification interface is a privacy proving parameter which is disclosed and related to the privacy information after the voting object is successfully registered in the target voting activity;
and when passing the privacy verification, determining that the voting object passes the identity verification.
4. A method according to any one of claims 1-3, wherein the ballot ciphertext is obtained by encrypting a random blinding factor and the target ballot based on a preset voting public key, and wherein a published commitment value is generated based on the random blinding factor and the target ballot; the commitment value characterizes: the voting object promises to complete legal voting in the target voting activity;
The verifying the validity of the ballot information based on the ballot ciphertext and a preset voting private key comprises the following steps:
based on the ballot information, acquiring a promise value associated with the target ballot, and calling a promise verification interface to perform promise validity verification on the promise value, wherein the promise verification interface is disclosed after the promise value is generated, and voting proof parameters related to the random blinding factor and the target ballot;
when the promise value passes the promise validity verification, decrypting the vote ciphertext based on the voting private key to obtain the target vote and a corresponding random blinding factor thereof;
and carrying out matching verification on the promised value based on the target ballot and the random blinding factor, and judging that the ballot information passes the validity verification after the matching verification is passed.
5. A method as claimed in any one of claims 1 to 3, wherein after said adding said ballot information to a ticketing collection, further comprising:
when a preset event termination condition is met, acquiring the ticket counting set; the ticket counting set comprises: ballot information transmitted by each of the plurality of voting objects in a specified history period;
Obtaining a ticket counting result based on the ticket counting set; the ticket counting result comprises: the total number of votes obtained by each candidate object in the specified history period;
and obtaining a public result of the target voting event based on the counting result.
6. A method according to any one of claims 1-3, further comprising:
and when the identity verification or the validity verification is determined not to pass, judging the target ballot as an invalid ballot, and sending an alarm signal.
7. An electronic voting apparatus, comprising:
the processing module is used for receiving the ballot information sent by the voting object based on the basic information after the basic information of the target voting activity is issued, wherein the ballot information at least comprises identification of the voting object in a block chain and ballot ciphertext, and the ballot ciphertext is obtained after encrypting the target ballot based on a preset voting public key;
the identity verification module is used for carrying out identity verification on the voting object based on the identity;
the vote verification module is used for verifying the validity of the vote information based on the vote ciphertext and a preset voting private key after the identity verification is confirmed;
And the statistics module is used for adding the ballot information to a counting set after the validity verification is confirmed.
8. An electronic device comprising a memory, a processor and a computer program stored on the memory and executable on the processor, wherein the processor implements the method of any of claims 1-6 when executing the computer program.
9. A computer readable storage medium, on which a computer program is stored, characterized in that the computer program, when being executed by a processor, implements the steps of the method according to any of claims 1-6.
10. A computer program product, characterized in that the computer program product, when called by a computer, causes the computer to perform the method according to any of claims 1-6.
CN202310190697.2A 2023-02-23 2023-02-23 Electronic voting method and related device Pending CN116192405A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202310190697.2A CN116192405A (en) 2023-02-23 2023-02-23 Electronic voting method and related device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202310190697.2A CN116192405A (en) 2023-02-23 2023-02-23 Electronic voting method and related device

Publications (1)

Publication Number Publication Date
CN116192405A true CN116192405A (en) 2023-05-30

Family

ID=86436358

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202310190697.2A Pending CN116192405A (en) 2023-02-23 2023-02-23 Electronic voting method and related device

Country Status (1)

Country Link
CN (1) CN116192405A (en)

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN116778628A (en) * 2023-08-25 2023-09-19 深圳市永兴元科技股份有限公司 E-government network voting method, device and equipment and readable storage medium
CN117040928A (en) * 2023-10-08 2023-11-10 广州市悦智计算机有限公司 Method for realizing voting right privacy distribution based on blockchain intelligent contract
CN117061089A (en) * 2023-10-12 2023-11-14 腾讯科技(深圳)有限公司 Voting management method, device, equipment and storage medium
CN117240496A (en) * 2023-07-20 2023-12-15 北京邮电大学 Voting method and related equipment

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110224993A (en) * 2019-05-16 2019-09-10 暨南大学 Anonymous Electronic Voting method and system of calling to account based on block chain
CN113037462A (en) * 2021-03-31 2021-06-25 华南理工大学 Fair electronic voting protocol method based on block chain and safe multi-party computation
WO2022089420A1 (en) * 2020-10-28 2022-05-05 深圳前海微众银行股份有限公司 Voting method and apparatus based on blockchain

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110224993A (en) * 2019-05-16 2019-09-10 暨南大学 Anonymous Electronic Voting method and system of calling to account based on block chain
WO2022089420A1 (en) * 2020-10-28 2022-05-05 深圳前海微众银行股份有限公司 Voting method and apparatus based on blockchain
CN113037462A (en) * 2021-03-31 2021-06-25 华南理工大学 Fair electronic voting protocol method based on block chain and safe multi-party computation

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
孙萌;王昀飚;: "基于区块链的可追踪匿名电子投票方案", 网络空间安全, no. 09, 25 September 2019 (2019-09-25) *

Cited By (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN117240496A (en) * 2023-07-20 2023-12-15 北京邮电大学 Voting method and related equipment
CN116778628A (en) * 2023-08-25 2023-09-19 深圳市永兴元科技股份有限公司 E-government network voting method, device and equipment and readable storage medium
CN117040928A (en) * 2023-10-08 2023-11-10 广州市悦智计算机有限公司 Method for realizing voting right privacy distribution based on blockchain intelligent contract
CN117040928B (en) * 2023-10-08 2024-02-09 广州市悦智计算机有限公司 Method for realizing voting right privacy distribution based on blockchain intelligent contract
CN117061089A (en) * 2023-10-12 2023-11-14 腾讯科技(深圳)有限公司 Voting management method, device, equipment and storage medium
CN117061089B (en) * 2023-10-12 2024-02-06 腾讯科技(深圳)有限公司 Voting management method, device, equipment and storage medium

Similar Documents

Publication Publication Date Title
Iqbal et al. Exploring sybil and double-spending risks in blockchain systems
US12021992B2 (en) System and method for authenticating user identity
CN108667632B (en) Credit record sharing method and device based on block chain and electronic equipment
CN116192405A (en) Electronic voting method and related device
Zhu et al. Hybrid blockchain design for privacy preserving crowdsourcing platform
CN112487468B (en) Traceable complete anonymous electronic voting method and system based on blockchain
CN111369730B (en) Voting processing method and device based on block chain
Dreier et al. Formal verification of e-auction protocols
US20220239502A1 (en) System to Securely Issue and Count Electronic Ballots
Dash et al. Artificial intelligence models for blockchain-based intelligent networks systems: Concepts, methodologies, tools, and applications
CN108540447A (en) A kind of certification authentication method and system based on block chain
Chaudhary et al. Blockchain-based secure voting mechanism underlying 5G network: A smart contract approach
CN112235109B (en) Block chain-based account recovery method and system
Austgen et al. Dao decentralization: Voting-bloc entropy, bribery, and dark daos
CN110781526A (en) Digital medal creation method, device, electronic apparatus, and medium
JP6967211B1 (en) Fully decentralized blockchain system and computer program for trading crypto assets that prevents illegal transactions while also allowing anonymous users to participate
Buyukbaskin et al. Requirement analysis of some blockchain-based e-voting schemes
CN114584357A (en) Anonymous safe voting method based on non-homogeneous Token
Hermstrüwer The limits of blockchain democracy: a transatlantic perspective on blockchain voting systems
Pandey et al. Functional analysis of blockchain consensus algorithms
Sri et al. E-voting system using blockchain
Gupta et al. Blockchain-Based Electronic Voting System
CN115314352B (en) Privacy-enhanced fair blockchain leader election method and device
CN113572620B (en) On-line voting method and system based on block chain
Ahmad et al. Formal Analysis of Improved and Secure Architecture of E-voting System using Hierarchical Coloured Petri Nets

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