@@ -73,9 +73,9 @@ This project was born in early 2021 and has been iteratively implemented by EPFL
73
73
students under the supervision of DEDIS members.
74
74
75
75
⚠️ This project is still under development and should not be used for real
76
- elections .
76
+ forms .
77
77
78
- Main properties of the system are the following:
78
+ Main properties of the system are the following:
79
79
80
80
<div align =" center " >
81
81
<img height="45px" src="docs/assets/spof-black.png#gh-light-mode-only">
@@ -89,7 +89,7 @@ side-protocols always distribute trust among nodes: The distributed key
89
89
generation protocol (DKG) ensures that a threshold of honest node is needed to
90
90
decrypt ballots, and the shuffling protocol needs at least one honest node to
91
91
ensure privacy of voters. Only the identification and authorization mechanism
92
- make use of a central authority, but can accommodate to other solutions.
92
+ make use of a central authority, but can accommodate to other solutions.
93
93
94
94
<div align =" center " >
95
95
<img height="45px" src="docs/assets/privacy-black.png#gh-light-mode-only">
@@ -107,11 +107,11 @@ be linked to the original voter.
107
107
<img height="50px" src="docs/assets/audit-white.png#gh-dark-mode-only">
108
108
</div >
109
109
110
- ** Transparency/Verifiability/Auditability** - The whole election process is
110
+ ** Transparency/Verifiability/Auditability** - The whole voting process is
111
111
recorded on the blockchain and signed by a threshold of blockchain nodes. Anyone
112
112
can read and verify the log of events stored on the blockchain. Malicious
113
113
behavior can be detected, voters can check that ballots are cast as intended,
114
- and auditors can witness the election process.
114
+ and auditors can witness the voting process.
115
115
116
116
## 🧩 Global architecture
117
117
@@ -120,12 +120,12 @@ The project has 4 main high-level components:
120
120
** Proxy** - A proxy offers the mean for an external actor such as a website to
121
121
interact with a blockchain node. It is a component of the blockchain node that
122
122
exposes HTTP endpoints for external entities to send commands to the node. The
123
- proxy is notably used by the web clients to use the election system.
123
+ proxy is notably used by the web clients to use the voting system.
124
124
125
125
** Web frontend** - The web frontend is a web app built with React. It offers a
126
126
view for end-users to use the D-Voting system. The app is meant to be used by
127
127
voters and admins. Admins can perform administrative tasks such as creating an
128
- election , closing it, or revealing the results. Depending on the task, the web
128
+ form , closing it, or revealing the results. Depending on the task, the web
129
129
frontend will directly send HTTP requests to the proxy of a blockchain node, or
130
130
to the web-backend.
131
131
@@ -137,7 +137,7 @@ web-backend has a local database to store configuration data such as
137
137
authorizations. Admins use the web-frontend to perform updates.
138
138
139
139
** Blockchain node** - A blockchain node is the wide definition of the program
140
- that runs on a host and participate in the election logic. The blockchain node
140
+ that runs on a host and participate in the voting logic. The blockchain node
141
141
is built on top of Dela with an additional d-voting smart contract, proxy, and
142
142
two services: DKG and verifiable Shuffling. The blockchain node is more
143
143
accurately a subsystem, as it wraps many other components. Blockchain nodes
@@ -156,9 +156,9 @@ website](https://dedis.github.io/d-voting/#/).
156
156
157
157
## Workflow
158
158
159
- An election follows a specific workflow to ensure privacy of votes. Once an
160
- election is created and open, there are 4 main steps from the cast of a ballot
161
- to getting the result of the election :
159
+ A form follows a specific workflow to ensure privacy of votes. Once an
160
+ form is created and open, there are 4 main steps from the cast of a ballot
161
+ to getting the result of the form :
162
162
163
163
<div align =" center " >
164
164
<img height="55px" src="docs/assets/encrypt-black.png#gh-light-mode-only">
@@ -186,7 +186,7 @@ associated to its voter on the blockchain.
186
186
<img height="70px" src="docs/assets/shuffle-white.png#gh-dark-mode-only">
187
187
</div >
188
188
189
- ** 3) Shuffle ballots** Once the election is closed by an admin, ballots are
189
+ ** 3) Shuffle ballots** Once the form is closed by an admin, ballots are
190
190
shuffled to ensure privacy of voters. This operation is done by a threshold of
191
191
node that each perform their own shuffling. Each shuffling guarantees the
192
192
integrity of ballots while re-encrypting and changing the order of ballots. At
@@ -200,7 +200,7 @@ this stage encrypted ballots cannot be linked back to their voters.
200
200
** 4) Reveal ballots** Once ballots have been shuffled, they are decrypted and
201
201
revealed. This operation is done only if the previous step is correctly
202
202
executed. The decryption is done by a threshold of nodes that must each provide
203
- a contribution to achieve the decryption. Once done, the result of the election
203
+ a contribution to achieve the decryption. Once done, the result of the form
204
204
is stored on the blockchain.
205
205
206
206
For a more formal and in-depth overview of the workflow, see the
@@ -216,16 +216,16 @@ successful only if a consensus is reached. Additionally, transactions and their
216
216
results are permanently recorded and signed on an append-only ledger, making any
217
217
operations on the blockchain transparent and permanent.
218
218
219
- In the D-Voting system a single D-Voting smart contract handles the elections .
220
- The smart contract ensures that elections follow a correct workflow to
219
+ In the D-Voting system a single D-Voting smart contract handles the forms .
220
+ The smart contract ensures that forms follow a correct workflow to
221
221
guarantees its desirable properties such as privacy. For example, the smart
222
222
contract won't allow ballots to be decrypted if they haven't been previously
223
223
shuffled by a threshold of nodes.
224
224
225
225
## Services
226
226
227
227
Apart from executing smart contracts, blockchain nodes need additional side
228
- services to support an election . Side services can read from the global state
228
+ services to support a form . Side services can read from the global state
229
229
and send transactions to write to it via the D-Voting smart contract. They are
230
230
used to perform specific protocol executions not directly related to blockchain
231
231
protocols such as the distributed key generation (DKG) and verifiable shuffling
@@ -239,13 +239,13 @@ contribution of a threshold of participants. This makes it convenient to
239
239
distribute trust on encrypted data. In the D-Voting project we use the Pedersen
240
240
[[ 1]] version of DKG.
241
241
242
- The DKG service needs to be setup at the beginning of each new election , because
243
- we want each election to have its own key-pair. Doing the setup requires two
242
+ The DKG service needs to be setup at the beginning of each new form , because
243
+ we want each form to have its own key-pair. Doing the setup requires two
244
244
steps: 1\) Initialization and 2\) Setup. The initialization creates new RPC
245
245
endpoints on each node, which they can use to communicate with each other. The
246
246
second step, the setup, must be executed on one of the node. The setup step
247
247
starts the DKG protocol and generates the key-pair. Once done, the D-Voting
248
- smart contract can be called to open the election , which will retrieve the DKG
248
+ smart contract can be called to open the form , which will retrieve the DKG
249
249
public key and save it on the smart contract.
250
250
251
251
[ 1 ] : https://dl.acm.org/doi/10.5555/1754868.1754929
@@ -256,10 +256,10 @@ The shuffling service ensures that encrypted votes can not be linked to the user
256
256
who cast them. Once the service is setup, each node can perform what we call a
257
257
"shuffling step". A shuffling step re-orders an array of elements such that the
258
258
integrity of the elements is guarantee (i.e no elements have been modified,
259
- added, or removed), but one can't trace how elements have been re-ordered.
259
+ added, or removed), but one can't trace how elements have been re-ordered.
260
260
261
261
In D-Voting we use the Neff [[ 2]] implementation of verifiable shuffling. Once
262
- an election is closed, an admin can trigger the shuffling steps from the nodes.
262
+ a form is closed, an admin can trigger the shuffling steps from the nodes.
263
263
During this phase, every node performs a shuffling on the current list of
264
264
encrypted ballots and tries to submit it to the D-Voting smart contract. The
265
265
smart contract will accept only one shuffling step per block in the blockchain.
@@ -326,7 +326,7 @@ results.
326
326
<tr>
327
327
<td>Fall 2021</td>
328
328
<td>Students: Auguste Baum, Emilien Duc<br>Supervisor: Noémien Kocher</td>
329
- <td>Adds a flexible election structure. Improves robustness and security.</td>
329
+ <td>Adds a flexible form structure. Improves robustness and security.</td>
330
330
<td>
331
331
<a href="https://www.epfl.ch/labs/dedis/wp-content/uploads/2022/02/report-2021-3-baum-auguste-Dvoting.pdf">Report</a>,
332
332
<a href="https://www.epfl.ch/labs/dedis/wp-content/uploads/2022/02/presentation-2021-3-baum-auguste-dvoting.pdf">Presentation</a>
@@ -350,7 +350,7 @@ results.
350
350
<tr>
351
351
<td>Spring 2022</td>
352
352
<td>Students: Badr Larhdir, Capucine Berger<br>Supervisor: Noémien Kocher</td>
353
- <td>Major iteration over the frontend - design and functionalities: implements a flexible election form, nodes setup, and result page.</td>
353
+ <td>Major iteration over the frontend - design and functionalities: implements a flexible form form, nodes setup, and result page.</td>
354
354
<td>
355
355
<a href="https://www.epfl.ch/labs/dedis/wp-content/uploads/2022/07/report-2022-1-capucine-badr-d-voting-frontend.pdf">Report</a>,
356
356
<a href="https://www.epfl.ch/labs/dedis/wp-content/uploads/2022/07/presentation-2022-1-capucine-badr-d-voting-frontend.pdf">Presentation</a>
@@ -378,10 +378,10 @@ added to you path (like with `export PATH=$PATH:/Users/david/go/bin`).
378
378
# Setup a simple system with 3 nodes
379
379
380
380
If you are using Windows and cannot use tmux, you need to do the actions of the
381
- scripts in point * 1 * and * 2 * manually: open 3 terminal sessions and run the
382
- commands from the section * Run the nodes * below (1 command LLVL=info memcoin etc.
381
+ scripts in point _ 1 _ and _ 2 _ manually: open 3 terminal sessions and run the
382
+ commands from the section _ Run the nodes _ below (1 command LLVL=info memcoin etc.
383
383
per terminal and then launch the setup script in another terminal). You can then
384
- follow the instructions below starting from point * 3 * .
384
+ follow the instructions below starting from point _ 3 _ .
385
385
386
386
1: Run 3 nodes
387
387
@@ -401,7 +401,6 @@ From the first terminal sessions, run:
401
401
./setupnNode.sh -n 3
402
402
```
403
403
404
-
405
404
3: Launch the web backend
406
405
407
406
From a new terminal session, run:
@@ -425,7 +424,7 @@ REACT_APP_PROXY=http://localhost:9081 REACT_APP_NOMOCK=on npm start
425
424
Note that you need to be on EPFL's network to login with Tequila. Additionally,
426
425
once logged with Tequila, update the redirect URL and replace
427
426
` dvoting-dev.dedis.ch ` with ` localhost ` . Once logged, you can create an
428
- election .
427
+ form .
429
428
430
429
5: Stop nodes
431
430
@@ -435,7 +434,7 @@ election.
435
434
436
435
6: Troubleshoot
437
436
438
- If while running
437
+ If while running
439
438
440
439
``` sh
441
440
npm start
@@ -453,11 +452,13 @@ then run this instead:
453
452
PORT=4000 npm start
454
453
# or any other available port
455
454
```
455
+
456
456
and in the web/frontend/src/setupProxy.js file, change :
457
457
458
458
``` sh
459
459
target: ' http://localhost:5000' ,
460
460
```
461
+
461
462
with
462
463
463
464
``` sh
@@ -486,11 +487,12 @@ Then you should be able to run the setup script:
486
487
``` sh
487
488
./setup.sh
488
489
```
490
+
489
491
With this other script using tmux you can choose the number of nodes that you
490
492
want to set up:
491
493
492
494
``` sh
493
- ./setupnNode.sh -n 3
495
+ ./setupnNode.sh -n 3
494
496
```
495
497
496
498
This script will setup the nodes and services. If you restart do not forget to
@@ -506,14 +508,13 @@ rm -rf /tmp/node{1,2,3}
506
508
507
509
If you have ` tmux ` installed, you can start a ` tmux ` session that will
508
510
execute the above setup by running in the project root ` ./runNode.sh -n 3 ` .
509
- This command takes as argument the number of nodes.
511
+ This command takes as argument the number of nodes.
510
512
Once the session is started, you can move around the panes with
511
513
` Ctrl+B ` followed by arrow keys or by ` N ` . You can also have an overview of the
512
514
windows with ` Ctrl+B ` followed by ` S ` .
513
515
514
-
515
516
To end the session, run ` ./kill_test.sh ` ,
516
- which will kill each window then the ` tmux ` session (which you can do manually
517
+ which will kill each window then the ` tmux ` session (which you can do manually
517
518
with ` Ctrl+D ` ), then delete the node data (i.e. the files ` /tmp/node{1,2,3} ` ).
518
519
519
520
## Run the scenario test
@@ -528,18 +529,19 @@ LLVL=info memcoin --config /tmp/node1 e-voting scenarioTest --secretkey $sk
528
529
529
530
You can also run scenario_test.go, by running in the integration folder this
530
531
command:
532
+
531
533
``` sh
532
534
NNODES=3 go test -v scenario_test.go
533
535
```
534
536
535
-
536
537
For reference, here is a hex-encoded kyber Ed25519 keypair:
537
538
538
539
Public key: ` adbacd10fdb9822c71025d6d00092b8a4abb5ebcb673d28d863f7c7c5adaddf3 `
539
540
540
541
Secret key: ` 28912721dfd507e198b31602fb67824856eb5a674c021d49fdccbe52f0234409 `
541
542
542
- ## Run the scenario test with docker
543
+ ## Run the scenario test with docker
544
+
543
545
Use the following commands to launch and set up nodes, and start the scenario
544
546
test with user defined number of nodes.
545
547
@@ -554,21 +556,21 @@ Afterwards use the following commands, replace 4 by the desired nb of nodes :
554
556
NNODES=4 KILLNODE=true go test -v -run ^TestScenario$ github.com/dedis/d-voting/integration -count=1
555
557
```
556
558
557
- Here we set KILLNODE=true or false to decide whether kill and restart a node
558
- during the election process. By default, it's set to false.
559
+ Here we set KILLNODE=true or false to decide whether kill and restart a node
560
+ during the voting process. By default, it's set to false.
559
561
560
562
To end the session, run ` ./kill_test.sh ` .
561
563
562
564
To launch multiple test and get statistics, run ` ./autotest.sh -n 10 -r 15 ` .
563
565
564
566
N.B. run following commands to get help
567
+
565
568
``` sh
566
569
./runNode.sh -h
567
570
./setupnNode.sh -h
568
571
./autotest.sh -h
569
572
```
570
573
571
-
572
574
# Use the frontend
573
575
574
576
See README in ` web/ ` .
0 commit comments