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.
- 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.
- 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".
In part 5 of https://github.com/microsoft/electionguard/files/5278086/EG.Verifier.Construction.docx:
Numbers 1 and 3 are not implemented in current python library. Number 2 is correct.
To follow the spec, one should use the extended base hash.
I thought it better to add an issue rather than a PR, since Im not sure of the status of the "validation spec".