Skip to content

Threshold decryption issues with multiple spoiled ballots #152

@keithrfung

Description

@keithrfung

When multiple ballots are spoiled and fewer than the total number of guardians are used to decrypt, tally decryption fails due to an incorrect proof.

This only seems to happen when the following are true:

  • More than one ballot is spoiled
  • We need to compensate for missing guardians

TO REPRODUCE:
In test_decryption_mediator.py, spoil the first ballot instead of casting, i.e.:

        ballot_store = BallotStore()
        ballot_box = BallotBox(self.metadata, self.context, ballot_store)
        ballot_box.spoil(encrypted_fake_cast_ballot)
        ballot_box.spoil(encrypted_fake_spoiled_ballot)

OR

Spoil the additional ballots:

        # Cast some more fake ballots
        for fake_ballot in self.more_fake_encrypted_ballots:
            ballot_box.spoil(fake_ballot)

and then run test_get_plaintext_tally_compensate_missing_guardian_simple, which produces warnings about invalid proofs, one guardian being compensated more than once, and ultimately fails to decrypt.

Note: this was originally found when generating sample data, but is easier to reproduce with the decryption mediator tests.

Metadata

Metadata

Assignees

Labels

bugSomething isn't working

Type

No type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions