dedis / d-voting

📧 E-Voting platform based on the Dela blockchain
https://dedis.github.io/d-voting
BSD 3-Clause "New" or "Revised" License
18 stars 7 forks source link

Cast an empty ballot makes shuffle impossible #17

Closed emduc closed 2 years ago

emduc commented 2 years ago

There is currently no check on the ballots submitted using the CastVote() command. If a node submits an empty ballot, the problem will be spotted only during the shuffle and the nodes will never be able to proceed.

A unit test has been added in /contracts/evoting/mod_test.go which should fail but currently passes.

To spot the problem, one can replace a casted ballot in the ScenarioTest by a simple CiphterText{}

emduc commented 2 years ago

Furthermore: what if the ciphertext appears valid but is not encrypted using the roster's public key?