Skip to content

"Validation of Ballot Chaining" in spec is wrong or not implemented correctly #272

Description

@JohnLCaron

In part 5 of https://github.com/microsoft/electionguard/files/5278086/EG.Verifier.Construction.docx:

5 Validation of Ballot Chaining

An election verifier must confirm that each of the values in the running hash is correctly computed.  
Specifically, an election verifier must confirm each of the following.

1. The equation H0=H(Q) is satisfied.
2. For each ballot Bi, Hi=H(Hi-1,D,T,Bi) is satisfied.
3. The closing hash H=H(Hl,"CLOSE") is correctly computed from the final tracking code Hl.

Numbers 1 and 3 are not implemented in current python library. Number 2 is correct.

  1. in EncryptionMediator in encrypt.py. line 71:
        self._seed_hash = encryption_device.get_hash()

To follow the spec, one should use the extended base hash.

  1. The closing hash is not computed. It appears that you would have to add a bogus CiphertextAcceptedBallot to do so?

I thought it better to add an issue rather than a PR, since Im not sure of the status of the "validation spec".

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions