You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardexpand all lines: docs/verifiability_doc.md
+18-18
Original file line number
Diff line number
Diff line change
@@ -2,9 +2,9 @@
2
2
3
3
## Introduction
4
4
5
-
Verifiability is an important property to allows voters to check their vote has been cast unaltered, and that it has been registered correctly in the electronic ballot box.
5
+
Verifiability is an important property that enables a voters to check their vote has been cast unaltered, and that it has been registered correctly in the electronic ballot box.
6
6
7
-
The current d-voting (version num) didn't have this design yet. The current encrypted ballot logic is shown as follows:
7
+
The current d-voting [latest commit](https://github.com/dedis/d-voting/commit/39a2d3363dd064a95186b0c31a44dfdea3325002) did not have this design yet. The current encrypted ballot logic is as follows:
8
8
9
9
```mermaid
10
10
sequenceDiagram
@@ -30,31 +30,31 @@ The current d-voting (version num) didn't have this design yet. The current encr
30
30
Backend ->>- User: 200 OK text/plain
31
31
```
32
32
33
-
As the picture show, the Frontend will encrypt the ballot using Elgamal encryption which has a nondeterministic result and then sends it to the Backend to verify and sign. After that, the backend will send the encrypted + signed ballot to the blockchain node to put it on the chain. However, since the encryption is nondeterministic thus the user will not able to verify their casted ballot stored in the node.
33
+
As the picture shows, the frontend encrypts the ballot using Elgamal encryption which has a nondeterministic result and then sends it to the backend to verify and sign. After that, the backend sends the encrypted + signed ballot to the blockchain node to put it on the chain. However, since the encryption is nondeterministic thus the user will not be able to verify their casted ballot stored in the node.
34
34
35
35
In this document, we aim to design an implementation to achieve verifiability of the voters' encrypted vote without leaking ballot information to others.
36
36
37
37
## Requirements
38
38
39
-
The voter should able to verify their encrypted ballot in Frontend.
40
-
The encrypted vote remain confidentiality from others.
41
-
The Node shall have an endpoint to get voter encrypted ballot.
39
+
The voter should be able to verify their encrypted ballot in the frontend.
40
+
The encrypted vote remains confidential from everyone except the voter.
41
+
The Node shall be able to show voters’ encrypted ballot.
42
42
43
43
## Related work
44
44
45
45
### Strawman approach
46
46
47
-
The strawman design is just using a fixed seed to encrypt the ballot which make the encrypted ballot deterministic. Then the user can verify the encrypted ballot on the chain by just encrypt a new ballot with the same option.
47
+
The strawman design is just using a fixed seed to encrypt the ballot which makes the encrypted ballot deterministic. Then the user can verify the encrypted ballot on the chain by just encrypting a new ballot with the same option.
48
48
49
-
However this design actually will break the confidentialy property of our d-voting system. An adversary be able to decrypt the user's ballot by recording the ciphertext of the encrypted ballot in every possible choice. Then the adversary can just check the ciphertext on the chain and will notify the voter ballot.
49
+
However this design actually will break the confidentiality property of our d-voting system. An adversary is able to decrypt the user's ballot by recording the ciphertext of the encrypted ballot in every possible choice. Then the adversary can just check the ciphertext on the chain and will notify the voter ballot.
50
50
51
-
Thus we should keep some secret only to the voter himselves or the backend to prevent adversary unlock the ballot.
51
+
Thus we should keep some secret only to the voter themselves or the backend to prevent adversaries unlocking the ballot.
52
52
53
53
### Swiss POST evoting system
54
54
55
-
Swiss POST implement their own [evoting system](https://www.evoting.ch/en) which support the verifiability of the casted ballot.
55
+
Swiss POST implement their own [e-voting system](https://www.evoting.ch/en) which support the verifiability of the casted ballot.
56
56
57
-
Their protocol takes place between a User, a trusted device, and an untrusted device. In this example the user will be Alice, the trusted device will be her cellphone, and the untrucsted device will be the evoting backend system. After casting the vote, user will received a encBallotReport (via QR code). Then the user can verify if their vote has been cast correctly or not.
57
+
Their protocol takes place between a User, a trusted device, and an untrusted device. In this example the user will be Alice, the trusted device will be her cellphone, and the untrusted device will be the e-voting backend system. After casting the vote, user will receive a encBallotReport (via QR code). Then the user can verify if their vote has been cast correctly or not.
58
58
59
59
```mermaid
60
60
sequenceDiagram
@@ -75,7 +75,7 @@ sequenceDiagram
75
75
76
76
## Proposed solution
77
77
78
-
According to our requirements, we assume that the frontend is trusted. If frontend is compromised, the adversary can already know the plaintext of the ballot which breaks the confidentiality of the ballot.
78
+
According to our requirements, we assume that the frontend is trusted. If the frontend is compromised, the adversary can already know the plaintext of the ballot which breaks the confidentiality of the ballot.
79
79
80
80
When the frontend after the frontend encrypted the ballot (use default non-deterministic encryption), it can hash the encrypted ballot and show the hash str of the encrypted ballot. The frontend sends the encrypted ballot to the backend.
81
81
@@ -109,16 +109,16 @@ sequenceDiagram
109
109
Note over User: check the hash of the vote is the same or not.
110
110
```
111
111
112
-
However, this design is still not perfect because it didn't have coercion resistance property because coercers will know the Hash of encrypted ballot during the vote. We can achieve coercion resistance via moved the encryption process to the backend and use benaloh challenge protocol to encrypt the vote. But currently our system didn't require coercion resistance thus we will not implement this.
112
+
However, this design is still not perfect because it doesn't have a coercion resistance property. After all, coercers will know the Hash of the encrypted ballot during the vote. We can achieve coercion resistance by moving the encryption process to the backend and using the Benaloh challenge protocol to encrypt the vote. But currently, our system doesn't require coercion resistance thus we will not implement this.
113
113
114
114
### frontend
115
115
116
116
- Edit the submit vote function
117
-
- hash the encrypted ballot and show to the user.
118
-
- Edit form details page to show the hash of ballot.
117
+
- hash the encrypted ballot and show it to the user.
118
+
- Edit the form details page to show the hash of the ballot.
119
119
- A user can select an election to see the details.
120
-
- In the detail page, it show who is the voter and the hash of their ballot.
121
-
-User can check if the hash they received is the same as the hash on the details.
120
+
- In the detail page, it shows the voter and the hash of their ballot.
121
+
-Users can check if the hash they received is the same as the hash on the details.
122
122
123
123
### Blockchain node
124
124
@@ -165,7 +165,7 @@ In the context of an election, the Benaloh Challenge ensues that systematic chea
165
165
166
166
Just like the Benaloh challenge, a user can assume that the backend is untrusted, and they have a Benaloh challenge with the backend.
167
167
168
-
The user first encrypts their ballot using the election public key and then sent it to the backend. Then the backend encrypted the encrypted ballot again with a randomly generated seed and sends the hash of the enc(enc(ballot)) to the user.
168
+
The user first encrypts their ballot using the election public key and then sends it to the backend. Then the backend encrypts the encrypted ballot again with a randomly generated seed and sends the hash of the enc(enc(ballot)) to the user.
169
169
170
170
Then the user can choose to challenge (which backend reveals the random seed) or accept (which backend executes the vote).
0 commit comments