Skip to content

Conversation

@jeffspel-crypto
Copy link
Contributor

Issue

Link your PR to an issue

Fixes #173,226

Description

This changes adds support for writeins and overvotes. The padding has been changed on hashed elgamal encryption and truncation support was added. Writeins and overvotes are detected in the encryptContest method and hashed elgamal encryption is performed whether or not data to encrypt is available. The encryption is always performed so that when viewing the CiphertextBallotContest it cannot be determined if there was an overvote or writein without decrypting. Serialization/deserialization has been updated for PlaintextBallotSelection and CiphertextBallotContest. Extended data in the PlaintextBallotSelection has been changed to writein data in order to be more specific and clear.

Testing

Added a test for hashed elgamal to test the truncation case. The hashed elgamal tests have been updated since the ciphertext produced has been changed to always be 512 bytes. Overvote failure tests have been updated to assume success when overvote cases are encountered. A test has been added to support an overvote and writein case.

@SteveMaier-IRT SteveMaier-IRT self-requested a review May 9, 2022 13:54
Copy link
Contributor

@SteveMaier-IRT SteveMaier-IRT left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

looks good.

@SteveMaier-IRT SteveMaier-IRT merged commit 97e13e7 into Election-Tech-Initiative:main May 12, 2022
@jeffspel-crypto jeffspel-crypto deleted the writeins_and_overvotes branch May 13, 2022 00:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

🔐. Encrypt Extended Data for Contests and Selections

3 participants