CN112422294A - Anonymous voting method and device based on ring signature, electronic equipment and storage medium - Google Patents

Anonymous voting method and device based on ring signature, electronic equipment and storage medium Download PDF

Info

Publication number
CN112422294A
CN112422294A CN202011417207.0A CN202011417207A CN112422294A CN 112422294 A CN112422294 A CN 112422294A CN 202011417207 A CN202011417207 A CN 202011417207A CN 112422294 A CN112422294 A CN 112422294A
Authority
CN
China
Prior art keywords
voting
ring
details
bill
zero knowledge
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Granted
Application number
CN202011417207.0A
Other languages
Chinese (zh)
Other versions
CN112422294B (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.)
Netease Hangzhou Network Co Ltd
Original Assignee
Netease Hangzhou Network 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 Netease Hangzhou Network Co Ltd filed Critical Netease Hangzhou Network Co Ltd
Priority to CN202011417207.0A priority Critical patent/CN112422294B/en
Publication of CN112422294A publication Critical patent/CN112422294A/en
Application granted granted Critical
Publication of CN112422294B publication Critical patent/CN112422294B/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
    • H04L9/3255Cryptographic 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 using group based signatures, e.g. ring or threshold 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/32Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols including means for verifying the identity or authority of a user of the system or for message authentication, e.g. authorization, entity authentication, data integrity or data verification, non-repudiation, key authentication or verification of credentials
    • H04L9/3218Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols including means for verifying the identity or authority of a user of the system or for message authentication, e.g. authorization, entity authentication, data integrity or data verification, non-repudiation, key authentication or verification of credentials using proof of knowledge, e.g. Fiat-Shamir, GQ, Schnorr, ornon-interactive zero-knowledge proofs
    • H04L9/3221Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols including means for verifying the identity or authority of a user of the system or for message authentication, e.g. authorization, entity authentication, data integrity or data verification, non-repudiation, key authentication or verification of credentials using proof of knowledge, e.g. Fiat-Shamir, GQ, Schnorr, ornon-interactive zero-knowledge proofs interactive zero-knowledge proofs
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L2209/00Additional information or applications relating to cryptographic mechanisms or cryptographic arrangements for secret or secure communication H04L9/00
    • H04L2209/42Anonymization, e.g. involving pseudonyms
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L2209/00Additional information or applications relating to cryptographic mechanisms or cryptographic arrangements for secret or secure communication H04L9/00
    • H04L2209/46Secure multiparty computation, e.g. millionaire problem
    • H04L2209/463Electronic voting

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Security & Cryptography (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 application provides a ring signature-based anonymous voting method and device, electronic equipment and a storage medium, wherein the method comprises the following steps: acquiring the total number of votes of the ring members in the previous time and the details of the voting; calculating the total voted number of the current time according to the details of the current time of voting and the total voted number of the previous time; generating zero knowledge proof information for proving that the total voted amount is less than or equal to a preset limit amount; performing ring signature on a message to be signed containing zero knowledge proof information to generate ring signature data; and initiating uplink storage for the voting details, zero knowledge certification information and ring signature data. The technical scheme can limit the voting number of the users, protect the identities of the voters and prevent the data from being tampered.

Description

Anonymous voting method and device based on ring signature, electronic equipment and storage medium
Technical Field
The present application relates to the field of block chain technologies, and in particular, to an anonymous voting method and apparatus based on a ring signature, an electronic device, and a computer-readable storage medium.
Background
Electronic voting has become a hot problem in the information security society nowadays, and compared with the traditional voting method, a great amount of manpower and material resources can be saved. The most basic requirements of electronic voting are to ensure the anonymity of the voter identity, the confidentiality of the votes, the fairness of the election process and the correctness of the election result.
However, the conventional voting device cannot limit the number of votes for each person due to complete anonymity of the user identity.
Disclosure of Invention
The embodiment of the application provides an anonymous voting method based on a ring signature, which is used for limiting the number of votes while carrying out anonymous voting.
The embodiment of the application provides an anonymous voting method based on a ring signature, which comprises the following steps:
acquiring the total number of votes of the ring members in the previous time and the details of the voting;
calculating the total voted for this time according to the details of the voting for this time and the total voted for the previous time;
generating zero knowledge proof information for proving that the total voted number is less than or equal to a preset limit amount;
performing ring signature on the message to be signed containing the zero knowledge proof information to generate ring signature data;
and initiating uplink storage for the voting details, the zero knowledge certification information and the ring signature data.
In an embodiment, the performing ring signature means that the private key of the ring member and the public keys of the other ring members are used to sign the message to be signed.
In an embodiment, the message to be signed includes the output ticket, the input ticket and the zero knowledge proof information;
after the calculating the total voted number, the method further includes:
calculating the output bill of this time according to the total number of votes voted in the previous time and the details of the voting of this time;
and the input bill is the output bill of the previous vote.
In an embodiment, the calculating the current output ticket according to the total number of votes voted for the previous time and the details of the vote includes:
and calculating the output bill according to the total number of votes voted in the previous time, the privacy key output by the votes voted in the previous time and the details of the votes voted in this time.
In an embodiment, the method further comprises:
randomly distributing an initialization bill and an initial privacy key for the ring members;
when the current vote is the first vote, the current input bill is the initialization bill, and the privacy key output by the previous vote is the initial privacy key.
In an embodiment, the method further comprises:
and initiating uplink storage for the output bill and the input bill.
In an embodiment, the method further comprises:
and generating an encrypted data packet by the details of the voting through a public key of a supervision terminal.
In an embodiment, the initiating uplink storage of the details of the vote, the zero knowledge certification information, and the ring signature data includes:
and initiating uplink storage of the encrypted data packet, the zero knowledge proof information and the ring signature data.
In an embodiment, the message to be signed includes an encrypted data packet and the zero knowledge proof of knowledge information.
In an embodiment, the message to be signed includes an encrypted data packet, the zero knowledge proof information, the output ticket and the input ticket;
the output bill is obtained by calculation according to the total number of votes voted in the previous time and the details of the voting; the input bill is an output bill of the previous voting.
The embodiment of the application also provides an anonymous voting method based on the ring signature, which comprises the following steps:
receiving a cochain request initiated by a client, and cochain storing the voting details, zero knowledge certification information and ring signature data;
verifying the validity of the ring signature data and the zero knowledge proof information;
and if the ring signature data and the zero knowledge proof information are verified, marking the voting details as effective voting.
In an embodiment, the method further includes: the uplink stores the current output bill and the current input bill contained in the uplink request;
and verifying whether the input bill exists or not, and if the input bill, the ring signature data and the zero knowledge proof information pass verification, adding the output bill into an effective bill list.
In an embodiment, the method further includes: and if the ring signature data and the zero knowledge proof information are verified, updating the latest bill to the output bill.
The embodiment of the application also provides an anonymous voting method based on the ring signature, which comprises the following steps:
acquiring an encrypted data packet marked as a valid vote from the block chain;
decrypting the encrypted data packet by using a private key to obtain voting details;
counting the voting details to obtain the total vote number of each voter;
and initiating uplink storage for the voted party with the highest total number of votes.
The embodiment of the present application further provides an anonymous voting device based on a ring signature, including:
the data acquisition module is used for acquiring the total number of votes of the ring members in the previous time and the details of the voting;
the vote counting module is used for counting the total voted for the time according to the details of the voting for the time and the total voted for the previous time;
the certification generating module is used for generating zero knowledge certification information for certifying that the total voted number is less than or equal to a preset limit amount;
the ring signature module is used for carrying out ring signature on the message to be signed containing the zero knowledge proof information to generate ring signature data;
and the uplink initiating module is used for initiating uplink storage for the voting details, the zero knowledge certification information and the ring signature data.
An embodiment of the present application further provides an electronic device, where the electronic device includes: a processor; a memory for storing processor-executable instructions; wherein the processor is configured to perform a ring signature based anonymous voting method.
Embodiments of the present application further provide a computer-readable storage medium, where the storage medium stores a computer program, and the computer program is executable by a processor to implement the above anonymous voting method based on ring signatures.
According to the technical scheme provided by the embodiment of the application, zero knowledge proving information for proving that the total voted number is less than or equal to a preset limiting amount is generated through a zero knowledge proving technology; therefore, the voting number of users can be limited, the message to be signed containing the zero knowledge proof information is signed in a ring signature mode to generate ring signature data, complete anonymity can be achieved, identity protection is conducted on voters, the voting details, the zero knowledge proof information and the ring signature data are sent to be linked up for storage, and data can be prevented from being tampered.
Drawings
In order to more clearly illustrate the technical solutions of the embodiments of the present application, the drawings required to be used in the embodiments of the present application will be briefly described below.
Fig. 1 is a schematic application scenario diagram of a method for anonymous voting based on a ring signature according to an embodiment of the present application;
fig. 2 is a system architecture diagram of a method for anonymous voting based on a ring signature according to an embodiment of the present application;
fig. 3 is a schematic flowchart of an anonymous voting method based on ring signatures according to an embodiment of the present disclosure;
FIG. 4 is a block diagram of vote number limiting circuitry;
fig. 5 is a schematic flowchart of an anonymous voting method based on ring signatures according to another embodiment of the present application;
fig. 6 is a schematic flowchart of an anonymous voting method based on ring signatures according to another embodiment of the present application;
fig. 7 is a block diagram of an anonymous voting apparatus based on a ring signature according to an embodiment of the present application.
Detailed Description
The technical solutions in the embodiments of the present application will be described below with reference to the drawings in the embodiments of the present application.
Like reference numbers and letters refer to like items in the following figures, and thus, once an item is defined in one figure, it need not be further defined and explained in subsequent figures.
Ring signature: allowing any ring member to be anonymously signed using the ring parameters without revealing the identity of the user and without being unsupervised. In the ring signature scheme, the signature is completed once through the assistance of ring members, and a signer cannot be deduced from any signature once.
A ring signature consists of the following steps:
1. and (3) ring generation: inputting a ring name (ring _ name), generating a ring parameter (ring _ param _ info) through a ring signature algorithm such as LSAG, and persisting the ring parameter.
2. The method comprises the steps of adding a member, inputting a ring name (ring _ name), randomly generating a private key (private _ key) and a public key (public _ key) of the member through a ring parameter (ring _ param _ info) read locally, sequentially increasing the position (pos) of the member in a ring (private _ key) and storing the private key (private _ key), the public key (public _ key), the position (pos) of the member and the total number (member _ count).
3. Ring signature: inputting voting information (msg), member positions (pos), the number of public key lists (member _ num), and ring names (ring _ name), signing the voting information (msg) by reading a private key (private _ key) of a member in the ring, a public key list (public _ key _ list) of a certain number (member _ num) of members in the ring, and a ring parameter (ring _ param _ info), and returning signature data (sign).
4. And (3) signature verification: inputting voting information (msg), signature data (sign) and a reading ring parameter (ring _ param _ info), and verifying whether the signature is valid. If the signature data (sign) is indeed a signature of the voting information (msg), the message is certified as valid.
Ring signature non-forgeability: other members of the ring cannot forge the true signer's signature. Complete anonymity: there is no group owner, only ring members, others can only verify the validity of the ring signature, but nobody can obtain the signer identity information.
Zero knowledge proves that: i.e. the prover can convince the verifier that a certain argument is correct without providing the verifier with any useful information. Zero knowledge may rely on user-encoded constraint circuit templates to generate the prover key (pk, proof key) and the verify key (vk, verification key) of the proof system of zero knowledge. Here, pk/vk is not a public and private key, but a pro key required for proof voting number limitation and a verify key required for verification voting number limitation, which are required when generating proof and verification proof. The viewing key is held by the voting system, and the verifykey is held by the blockchain system.
Block chains: namely, a brand new distributed infrastructure and computing paradigm of verifying and storing data using a blockchain data structure, generating and updating data using a distributed node consensus algorithm, securing data transmission and access using cryptography, and programming and manipulating data using intelligent contracts composed of automated script code.
Fig. 1 is a schematic application scenario diagram of a method for anonymous voting based on a ring signature according to an embodiment of the present application. The application scenario includes: a client 110 with a plurality of ring members, a manager terminal 120 and a server 130. The clients 110 with multiple ring members and the administrator terminal 120 deploy a voting system. The server 130 deploys a blockchain system. The client 110 and the administrator terminal 120 where the ring member is located may be a mobile phone, a notebook computer or a desktop computer. The server 130 may include one or more servers.
Fig. 2 is a system architecture diagram of a method for anonymous voting based on a ring signature according to an embodiment of the present application. As shown in fig. 2, the underlying dependency algorithm includes: a zero knowledge proof algorithm library (generating proof of vote, verifying proof of vote, supervising encryption and decryption of clear text of voting details) and a ring signature algorithm library (generating ring, adding ring, ring signature).
The block chain system: deploying a ring signature voting contract and storing and recording anonymous voting details; the verification of zero knowledge proof and the verification of ring signature are carried out by depending on the bottom algorithm library.
The voting system comprises: and the method helps to complete items except various block chains of ring signature voting. And (4) relying on an underlying algorithm library to perform zero-knowledge proof (generating voting proof, supervising encryption and decryption of voting detail plaintext) and executing a ring signature algorithm (generating a ring, adding a ring and performing ring signature).
In one embodiment, as shown in fig. 2, the voting system (executed by the administrator terminal 120) (1) is initialized: the zero-knowledge-based vote quantity limiting circuit generates a certification key and a verification key of a zero-knowledge certification system, creates a ring (ring name is input, ring parameter (ring _ param _ info) is generated through a ring signature algorithm such as LSAG), deploys a voting contract to a block chain, initializes the contract parameter (ring parameter) and generates a certain quantity of initialization tickets (cm parameter)0) And an initial privacy key (key). The bill generation rules are as follows: the note cm is hash (key + voteSum + voteInfo); the hash algorithm may be sha 256; the key is generated randomly. The bill Cm is generated through a hash algorithm, so that the uniqueness can be guaranteed. voteSum has initialized the number of votes to 0 and voteInfo voting details to null. The initialization ticket and the initial privacy key generated by the administrator terminal 120 may be transmitted to the server 130, and the initialization ticket and the initial privacy key are transmitted to the client 110 where the ring member is located by the server 130. Wherein the initialization ticket may be saved in a blockchain.
(2) The client 110 may send a request to the server 130 to become a voting member (i.e., ring member). The server 130 may input a ring name (ring _ name), randomly generate a private key (private _ key) and a public key (public _ key) of a member through a ring parameter (ring _ param _ info) read locally, sequentially increment a position (pos) of the member in the ring (private _ key) (private _ key cannot be leaked), and store the private key (private _ key), the public key (public _ key), the position (pos) of the member, and the total number (member _ count) of the member. The member public key and the member location are returned to the client 110 to facilitate the client 110 to sign the voting information. After the user becomes a ring member, the user knows the member public key and the member position and is used for subsequently signing voting information. After the user joins successfully, the server 130 randomly distributes an initialization ticket and an initial privacy key to the user for subsequent voting certification. The initial privacy key must not be made public and must be kept by the user.
(3) The client 110 where the ring member is located may rely on the zero knowledge proof key to generate zero knowledge proof information that the total voted this time is less than or equal to a preset limit amount; performing ring signature on the message to be signed containing the zero knowledge proof information to generate ring signature data; and initiating uplink storage for the voting details, zero knowledge certification information and ring signature data. The blockchain system (i.e. blockchain nodes) relies on the underlying algorithm, and can perform ring signature verification and zero knowledge verification. The effective bill list is used for storing the output bill passing the verification, and the voting detail list is used for storing the voting details passing the verification.
(4) The manager terminal 120 may decrypt the encrypted data packet of the linked voting details to obtain the voting objects and the voting numbers, and further count the voting results, determine the highest votes, and link up for storage.
The embodiment of the present application further provides an electronic device, which may be used as the client 110, the administrator terminal 120, or the server 130, where the electronic device may include a processor and a memory for storing executable instructions of the processor; wherein the processor is configured to execute the anonymous voting method based on the ring signature provided by the embodiment of the application.
Embodiments of the present application also provide a computer-readable storage medium storing a computer program executable by a processor to perform the following ring signature-based anonymous voting method.
Fig. 3 is a flowchart of an anonymous voting method based on ring signatures according to an embodiment of the present application, where the method may be executed by a client, and as shown in fig. 3, the method includes: step S310-step S350.
And step S310, acquiring the total voted number of the ring members in the previous time and the details of the voting.
The total number of votes voted for the previous time refers to the number of votes voted for the previous time after the previous vote is finished. The previous time is relative to the current time, for example, the current time is the fifth voting, and the previous time is the fourth voting. If the current time is the first time of voting, the total number of votes voted for the previous time is 0. The details of the current vote include the current voting object and the number of votes, for example, if three votes and five votes are cast at the current time, the current voting object is three votes and the number of votes is 5.
Step S320: and calculating the total voted for the time according to the details of the voting for the time and the total voted for the previous time.
The total voted number of this time refers to the total votes cast after the voting of this time is finished, and is the sum of the total votes of this time and the total votes voted for the previous time. For example, if three 5 votes are cast this time and the total votes voted for the previous time is 13 votes, the total votes voted for this time is 18 votes.
Step S330: and generating zero knowledge proof information for proving that the total voted number is less than or equal to a preset limit amount.
The client can generate zero knowledge proof information for proving that the total voted number is less than or equal to the preset limit amount through a proof key of the zero knowledge proof system. According to the requirement, the information of the voting object and the voting times is proved to be correct. And (4) proving the validity of the privacy key (key) output by the previous voting and the total voteSum voted for the previous voting.
Fig. 4 is an architectural diagram of vote number limiting circuitry (i.e., zero knowledge proof system). As shown in fig. 4, the vote _ in _ gadget is validity of the voteSum for proving the number of votes voted, details voteInfo of previous votes of the user, and privacy key of the previous time, that is, cm ═ hash (key + voteSum + voteInfo). The vote _ minddle _ gap (user voting middle circuit) is used for proving that the information of the voting times of the voting object is correct. The vote _ out _ gadget (user voting output circuit) proves that the total number of votes of this time is the sum of the number of votes already voted and the number of votes of the user of this time, and cm is hash (key + voteSum + voteInfo). The gov _ gadget (supervision circuit) is used for supervising the voting times and details (vote _ count _ mid/vote _ info _ mid) of the user at this time, and generating a gpk _ data (encrypted data packet); the vote _ all _ gadget is used for proving that the user votes less than or equal to the total limit number voteSum < ═ vote _ limit _ count, and outputting the integral proving data. If the total number of votes from the user in the proof exceeds the limit, the proof cannot be verified subsequently.
Step S340: and performing ring signature on the message to be signed containing the zero knowledge proof information to generate ring signature data.
As described above, the ring signature may be a private key of a member in the ring, a public key list of a certain number of members in the ring, and a ring parameter, and the message to be signed is signed to obtain ring signature data.
In one embodiment, the message to be signed may include the output ticket, the input ticket, and zero knowledge proof information. Wherein, the input bill is the output bill of the previous vote. The output bill of this time can be calculated according to the total voted number of the previous time and the details of the voting after the total voted number of this time is calculated. The output bill can be used as the input bill for the next voting.
For example, the user has 2 consecutive rounds of voting: ticket and privacy key at cm0, key0 initialization: are distributed by the system. The ticket and privacy key for the first vote of cm1 and key1 cast 1 ticket to the sheetlet for the first time, for 1 total time. cm2, key2 ticket and privacy key for the first vote, and 2 tickets for the second vote, for 2 total. As shown in the following table:
Figure BDA0002819016860000111
Figure BDA0002819016860000121
as can be seen from the table above, the ring members are randomly assigned an initialization ticket cm0 and an initial privacy ticket key0 before the first vote. When the vote is the first vote (see the second column of the table), the input ticket is the initialization ticket cm0, and the privacy key output by the previous vote is the initial privacy key 0. Since cm is hash (key + voteSum + voteInfo), the first vote is cast 1 vote, since the total number of votes voted for the previous time was 0, the output ticket cm1 of the first vote is hash (key0+0+1), resulting in the privacy key 1. The second vote is 2 votes, the total number of votes voted for the previous vote is 1 vote, the input vote is cm1, so the output vote for the second vote is cm2 hash (key1+1+ 2).
Assuming that this time is the second vote and the previous time is the first vote, the input ticket is cm1, and the output ticket is cm 2. The ring signature can be carried out on the zero knowledge certification information, the input bill and the output bill.
In an embodiment, the details of the vote may be generated into an encrypted data packet through a public key of the supervision terminal. And performing ring signature on the encrypted data packet and the zero knowledge proof information which are taken as messages to be signed. In an embodiment, the message to be signed may include the encrypted data packet, the zero knowledge proof information, the output ticket, and the input ticket. Thus, the signature data sign is sign (note _ cm _ input of the input note this time + note _ cm _ output of the output note this time + encrypted data packet gpk _ data + zero knowledge proof information proof);
the supervision terminal may be the administrator terminal described above. The details of the voting can comprise voters and the number of votes, and after the public key of the supervising end is used for encryption, the supervising end can decrypt the details of the voting through the private key of the supervising end to realize the protection of the voting information and prevent leakage.
The output bill of the previous vote is used as the input bill of the current vote, and the continuity of the bills can ensure that the vote is in the hands of the same user and prevent the user from tampering the historical voting condition. The initialization ticket and the initial privacy key are distributed, so that the user can be prevented from tampering with or generating the initialization ticket.
Step S350: and initiating uplink storage for the voting details, the zero knowledge certification information and the ring signature data.
The client side can send the voting details, the zero knowledge certification information and the ring signature data to the server side and store the voting details, the zero knowledge certification information and the ring signature data in the block chain. According to the requirement, the details of the voting can be in the form of an encrypted data packet, namely, a data packet generated by encrypting a public key of the supervising end. The uplink data may include: sign, vote _ cm _ input, vote _ cm _ output, gpk _ data, proof, and the like, and then the server verifies the signature data, the zero knowledge proof data, and the like.
Fig. 5 is a flowchart illustrating an anonymous voting method based on ring signatures according to another embodiment of the present application. The method steps may be performed by a server, as shown in fig. 5, and the method includes: step S510-step S530.
Step S510: and receiving a uplink request initiated by the client, and storing the voting details, the zero knowledge certification information and the ring signature data by uplink.
The uplink request may include details of the current vote, zero knowledge proof information, and ring signature data. The details of the vote may be in the form of an encrypted data packet. The server side can pack and add the voting details, the zero knowledge certification information and the ring signature data into the block chain. The input bill and the output bill can be stored in the chain according to the requirement.
Step S520: verifying the validity of the ring signature data and the zero knowledge proof information.
Assuming that the message to be signed only includes zero knowledge proof information, the server can verify whether the ring signature data is signature data of the zero knowledge proof information, and if so, the signature verification is passed, that is, the ring signature data is valid. In an embodiment, the message to be signed may encrypt the data packet, the zero knowledge proof information, the output ticket at this time, and the input ticket at this time. So if the verified ring signature data is indeed the signature of the message to be signed, the verification is passed.
The zero knowledge proof information can be analyzed through the proof key, if the analysis is successful, the zero knowledge proof information is effective, namely the total voted number is less than or equal to the preset limit amount.
Step S530: and if the ring signature data and the zero knowledge proof information are verified, marking the voting details as effective voting.
In one embodiment, if both the votes pass the verification, the voting details of this time can be marked as valid votes and added to the voting detail list.
In an embodiment, after receiving the uplink request, the server may further uplink and store the current output ticket and the current input ticket included in the uplink request; and verifying whether the input bill exists or not, and if the input bill, the ring signature data and the zero knowledge proof information pass verification, adding the output bill into an effective bill list.
Because whether the number of votes cast by the voting members exceeds the preset limit amount is counted, the method is specific to the same voting member, under an ideal condition, the input ticket of the same voting member is always the output ticket of the previous voting, and if the input ticket does not exist, the output ticket is forged. Whether the input bill exists or not is judged, if yes, the input bill and the output bill can determine whether the input bill and the output bill are the bills put out by the same member or not, and the specific identity of the member is unknown at the moment.
In an embodiment, if the ring signature data and the zero knowledge proof information are both verified, the latest ticket may be updated to the output ticket this time. Therefore, whether the input bill is the latest bill can be verified when the input bill and the output bill are received next time.
Fig. 6 is a flowchart illustrating an anonymous voting method based on ring signatures according to another embodiment of the present application. The method steps may be performed by a manager terminal, as shown in fig. 6, the method comprising: step S610-step S630.
Step S610: and acquiring the encrypted data packet marked as the valid vote from the block chain.
The encrypted data packet is generated by encrypting the voting details of each time by the client terminal with the public key of the administrator terminal. The encrypted data packet may be stored in a blockchain of the server. After the voting is ended, the manager terminal can acquire the encrypted data packet from the block chain of the server side, so that the details of each voting are detailed.
Step S620: and decrypting the encrypted data packet by using a private key to obtain the voting details.
Step S630: and counting the voting details to obtain the total votes of each votee.
Details of the vote include the voter and the number of votes obtained, e.g. 1 st vote, 3 th vote. The total number of votes refers to the total number of votes obtained by the voter. If x casts three 1 votes, y casts three 5 votes, and z casts three 3 votes, then the total number of votes voted for three is 9 votes.
Step S640: and initiating uplink storage for the voted party with the highest total number of votes.
The following is an embodiment of the apparatus of the present application, which can be used to execute the above embodiments of the anonymous voting method based on ring signatures of the present application. For details not disclosed in the embodiments of the apparatus of the present application, please refer to the embodiments of the anonymous voting method based on ring signatures of the present application.
Fig. 7 is a block diagram of an anonymous voting apparatus based on a ring signature according to an embodiment of the present application, and as shown in fig. 7, the apparatus includes: a data acquisition module 710, a ticket number calculation module 720, a certificate generation module 730, a ring signature module 740, and a uplink initiation module 750.
And the data acquisition module 710 is used for acquiring the total number of votes voted for the previous time by the ring members and details of the voting.
And the vote number calculating module 720 is configured to calculate the total voted this time according to the details of voting this time and the total voted last time.
The certification generating module 730 is configured to generate zero knowledge certification information that proves that the total voted number of this time is less than or equal to a preset limit amount.
And the ring signature module 740 is configured to perform ring signature on the message to be signed including the zero knowledge proof information, and generate ring signature data.
A cochain initiating module 750, configured to initiate cochain storage for the voting details, the zero knowledge certification information, and the ring signature data.
The implementation process of the function and the effect of each module in the device is specifically described in the implementation process of the corresponding step in the anonymous voting method based on the ring signature, and is not described herein again.
In the embodiments provided in the present application, the disclosed apparatus and method can be implemented in other ways. The apparatus embodiments described above are merely illustrative, and for example, the flowchart and block diagrams in the figures illustrate the architecture, functionality, and operation of possible implementations of apparatus, methods and computer program products according to various embodiments of the present application. In this regard, each block in the flowchart or block diagrams may represent a module, segment, or portion of code, which comprises one or more executable instructions for implementing the specified logical function(s). In some alternative implementations, the functions noted in the block may occur out of the order noted in the figures. For example, two blocks shown in succession may, in fact, be executed substantially concurrently, or the blocks may sometimes be executed in the reverse order, depending upon the functionality involved. It will also be noted that each block of the block diagrams and/or flowchart illustration, and combinations of blocks in the block diagrams and/or flowchart illustration, can be implemented by special purpose hardware-based systems which perform the specified functions or acts, or combinations of special purpose hardware and computer instructions.
In addition, functional modules in the embodiments of the present application may be integrated together to form an independent part, or each module may exist separately, or two or more modules may be integrated to form an independent part.
The functions, if implemented in the form of software functional modules and sold or used as a stand-alone product, may be stored in a computer readable storage medium. Based on such understanding, the technical solution of the present application or portions thereof that substantially contribute to the prior art may be embodied in the form of a software product stored in a storage medium and including instructions for causing a computer device (which may be a personal computer, a server, or a network device) to execute all or part of the steps of the method according to the embodiments of the present application. And the aforementioned storage medium includes: a U-disk, a removable hard disk, a Read-Only Memory (ROM), a Random Access Memory (RAM), a magnetic disk or an optical disk, and other various media capable of storing program codes.

Claims (17)

1. An anonymous voting method based on ring signatures, comprising:
acquiring the total number of votes of the ring members in the previous time and the details of the voting;
calculating the total voted for this time according to the details of the voting for this time and the total voted for the previous time;
generating zero knowledge proof information for proving that the total voted number is less than or equal to a preset limit amount;
performing ring signature on the message to be signed containing the zero knowledge proof information to generate ring signature data;
and initiating uplink storage for the voting details, the zero knowledge certification information and the ring signature data.
2. The method according to claim 1, wherein the ring signature is performed by signing the message to be signed by using a private key of the ring member and public keys of the remaining ring members.
3. The method according to claim 1, wherein the message to be signed comprises the output ticket, the input ticket and the zero knowledge proof information;
after the calculating the total voted number, the method further includes:
calculating the output bill of this time according to the total number of votes voted in the previous time and the details of the voting of this time;
and the input bill is the output bill of the previous vote.
4. The method of claim 3, wherein said calculating said output ticket based on said total number of votes voted for the previous time and details of the vote comprises:
and calculating the output bill according to the total number of votes voted in the previous time, the privacy key output by the votes voted in the previous time and the details of the votes voted in this time.
5. The method of claim 4, further comprising:
randomly distributing an initialization bill and an initial privacy key for the ring members;
when the current vote is the first vote, the current input bill is the initialization bill, and the privacy key output by the previous vote is the initial privacy key.
6. The method of claim 3, further comprising:
and initiating uplink storage for the output bill and the input bill.
7. The method of claim 1, further comprising:
and generating an encrypted data packet by the details of the voting through a public key of a supervision terminal.
8. The method of claim 7, wherein the initiating uplink storage of the details of the current vote, zero knowledge proof information and ring signature data comprises:
and initiating uplink storage of the encrypted data packet, the zero knowledge proof information and the ring signature data.
9. The method of claim 7, wherein the message to be signed comprises an encrypted data packet and the zero knowledge proof of knowledge information.
10. The method of claim 9, wherein the message to be signed comprises an encrypted data packet, the zero knowledge proof information, a present output ticket, and a present input ticket;
the output bill is obtained by calculation according to the total number of votes voted in the previous time and the details of the voting; the input bill is an output bill of the previous voting.
11. An anonymous voting method based on ring signatures, comprising:
receiving a cochain request initiated by a client, and cochain storing the voting details, zero knowledge certification information and ring signature data;
verifying the validity of the ring signature data and the zero knowledge proof information;
and if the ring signature data and the zero knowledge proof information are verified, marking the voting details as effective voting.
12. The method of claim 11, further comprising:
the uplink stores the current output bill and the current input bill contained in the uplink request;
and verifying whether the input bill exists or not, and if the input bill, the ring signature data and the zero knowledge proof information pass verification, adding the output bill into an effective bill list.
13. The method of claim 12, further comprising:
and if the ring signature data and the zero knowledge proof information are verified, updating the latest bill to the output bill.
14. An anonymous voting method based on ring signatures, comprising:
acquiring an encrypted data packet marked as a valid vote from the block chain;
decrypting the encrypted data packet by using a private key to obtain voting details;
counting the voting details to obtain the total vote number of each voter;
and initiating uplink storage for the voted party with the highest total number of votes.
15. An anonymous voting apparatus based on a ring signature, comprising:
the data acquisition module is used for acquiring the total number of votes of the ring members in the previous time and the details of the voting;
the vote counting module is used for counting the total voted for the time according to the details of the voting for the time and the total voted for the previous time;
the certification generating module is used for generating zero knowledge certification information for certifying that the total voted number is less than or equal to a preset limit amount;
the ring signature module is used for carrying out ring signature on the message to be signed containing the zero knowledge proof information to generate ring signature data;
and the uplink initiating module is used for initiating uplink storage for the voting details, the zero knowledge certification information and the ring signature data.
16. An electronic device, characterized in that the electronic device comprises:
a processor;
a memory for storing processor-executable instructions;
wherein the processor is configured to perform the ring signature-based anonymous voting method of any one of claims 1 to 14.
17. A computer-readable storage medium, characterized in that the storage medium stores a computer program executable by a processor to perform the ring signature based anonymous voting method of any one of claims 1 to 14.
CN202011417207.0A 2020-12-04 2020-12-04 Anonymous voting method and device based on ring signature, electronic equipment and storage medium Active CN112422294B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202011417207.0A CN112422294B (en) 2020-12-04 2020-12-04 Anonymous voting method and device based on ring signature, electronic equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202011417207.0A CN112422294B (en) 2020-12-04 2020-12-04 Anonymous voting method and device based on ring signature, electronic equipment and storage medium

Publications (2)

Publication Number Publication Date
CN112422294A true CN112422294A (en) 2021-02-26
CN112422294B CN112422294B (en) 2022-11-01

Family

ID=74776349

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202011417207.0A Active CN112422294B (en) 2020-12-04 2020-12-04 Anonymous voting method and device based on ring signature, electronic equipment and storage medium

Country Status (1)

Country Link
CN (1) CN112422294B (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113395164A (en) * 2021-04-22 2021-09-14 江苏大学 Electronic voting method based on ring signature and block chain

Citations (11)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN108768992A (en) * 2018-05-17 2018-11-06 深圳前海微众银行股份有限公司 Information anonymous transmission method, equipment and readable storage medium storing program for executing based on block chain
CN109272631A (en) * 2017-07-17 2019-01-25 卡巴斯基实验室股份制公司 The system and method for determining the ballot paper of the voter collected by electronic voting
EP3474241A1 (en) * 2017-10-17 2019-04-24 AO Kaspersky Lab Electronic balloting
CN109687979A (en) * 2019-03-06 2019-04-26 郑州师范学院 A kind of ring signatures method, apparatus, equipment and medium
CN110060403A (en) * 2019-03-21 2019-07-26 杭州电子科技大学 The more ticket electronic voting methods of a people and system based on block chain
CN110855443A (en) * 2019-10-29 2020-02-28 上海唯链信息科技有限公司 Voting method and device based on block chain and zero knowledge proof
CN110867012A (en) * 2019-11-15 2020-03-06 哈尔滨工业大学(深圳) Method, device and system for de-centering electronic voting based on intelligent contract and storage medium
WO2020124843A1 (en) * 2018-12-21 2020-06-25 暨南大学 Traceable anonymous electronic voting method employing blockchain
KR20200087913A (en) * 2019-01-11 2020-07-22 서강대학교산학협력단 System and method for providing secret electronic voting service based on blockchain
CN111563733A (en) * 2020-04-28 2020-08-21 杭州云象网络技术有限公司 Ring signature privacy protection system and method for digital wallet
CN111583498A (en) * 2020-05-29 2020-08-25 深圳市网心科技有限公司 Electronic voting method, system, equipment and storage medium based on block chain

Patent Citations (11)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109272631A (en) * 2017-07-17 2019-01-25 卡巴斯基实验室股份制公司 The system and method for determining the ballot paper of the voter collected by electronic voting
EP3474241A1 (en) * 2017-10-17 2019-04-24 AO Kaspersky Lab Electronic balloting
CN108768992A (en) * 2018-05-17 2018-11-06 深圳前海微众银行股份有限公司 Information anonymous transmission method, equipment and readable storage medium storing program for executing based on block chain
WO2020124843A1 (en) * 2018-12-21 2020-06-25 暨南大学 Traceable anonymous electronic voting method employing blockchain
KR20200087913A (en) * 2019-01-11 2020-07-22 서강대학교산학협력단 System and method for providing secret electronic voting service based on blockchain
CN109687979A (en) * 2019-03-06 2019-04-26 郑州师范学院 A kind of ring signatures method, apparatus, equipment and medium
CN110060403A (en) * 2019-03-21 2019-07-26 杭州电子科技大学 The more ticket electronic voting methods of a people and system based on block chain
CN110855443A (en) * 2019-10-29 2020-02-28 上海唯链信息科技有限公司 Voting method and device based on block chain and zero knowledge proof
CN110867012A (en) * 2019-11-15 2020-03-06 哈尔滨工业大学(深圳) Method, device and system for de-centering electronic voting based on intelligent contract and storage medium
CN111563733A (en) * 2020-04-28 2020-08-21 杭州云象网络技术有限公司 Ring signature privacy protection system and method for digital wallet
CN111583498A (en) * 2020-05-29 2020-08-25 深圳市网心科技有限公司 Electronic voting method, system, equipment and storage medium based on block chain

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113395164A (en) * 2021-04-22 2021-09-14 江苏大学 Electronic voting method based on ring signature and block chain
CN113395164B (en) * 2021-04-22 2022-11-18 江苏大学 Electronic voting method based on ring signature and block chain

Also Published As

Publication number Publication date
CN112422294B (en) 2022-11-01

Similar Documents

Publication Publication Date Title
US11232478B2 (en) Methods and system for collecting statistics against distributed private data
CN110224993B (en) Responsibility pursuing anonymous electronic voting method and system based on block chain
CN109756485B (en) Electronic contract signing method, electronic contract signing device, computer equipment and storage medium
EP3563553B1 (en) Method for signing a new block in a decentralized blockchain consensus network
Wei et al. Security and privacy for storage and computation in cloud computing
Wei et al. SecCloud: Bridging secure storage and computation in cloud
Paul et al. RC4 stream cipher and its variants
CN100432889C (en) System and method providing disconnected authentication
CN112600675B (en) Electronic voting method and device based on group signature, electronic equipment and storage medium
Bulens et al. Running {Mixnet-Based} Elections with Helios
CN103095453A (en) Public-key Encrypted Bloom Filters With Applications To Private Set Intersection
Qureshi et al. SeVEP: Secure and verifiable electronic polling system
CN108712259B (en) Identity-based cloud storage efficient auditing method capable of uploading data by proxy
CN110599164B (en) Supervision-capable quick payment method for any payee under chain
CN110867012A (en) Method, device and system for de-centering electronic voting based on intelligent contract and storage medium
Cui et al. Proof of retrievability with public verifiability resilient against related‐key attacks
CN115396115A (en) Block chain data privacy protection method, device, equipment and readable storage medium
Gao et al. Quantum election protocol based on quantum public key cryptosystem
CN112422294B (en) Anonymous voting method and device based on ring signature, electronic equipment and storage medium
CN111245594B (en) Homomorphic operation-based collaborative signature method and system
Rodríguez-Henríquez et al. Yet another improvement over the Mu–Varadharajan e-voting protocol
US10686599B2 (en) Method for the verification of the correct content of an encoded message
CN111314059B (en) Processing method, device and equipment for account authority proxy and readable storage medium
Wang et al. A novel blockchain identity authentication scheme implemented in fog computing
Li et al. Blockchain‐Based Fine‐Grained Data Sharing for Multiple Groups in Internet of Things

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