electionguard-python icon indicating copy to clipboard operation
electionguard-python copied to clipboard

✨ Null hashes don't match between Python and C++

Open lmarie79 opened this issue 3 years ago • 4 comments

Feature Request

Description There is a discrepancy between null hashes in the C and Python code. A hash of null results in H() in one case but H(|), a hash of a delimiter, in the other.

Proposed Solution Per @benaloh - a null hash should just be H()

lmarie79 avatar Feb 08 '22 20:02 lmarie79

We are waiting for an individual to confirm the location of this issue. This is marked as question due to this.

keithrfung avatar Feb 08 '22 21:02 keithrfung

This doesn't make sense. The code reads this should result in a hash of H(|null|) in python. We definitely need follow up. https://github.com/microsoft/electionguard-python/blob/e35b68dc3175243ffaf872e9a0ea56c5b8a05830/src/electionguard/hash.py#L88-L93

keithrfung avatar Feb 08 '22 21:02 keithrfung

@rc-ms considering whether to push to 2.0 or closing all together

lmarie79 avatar Feb 22 '22 19:02 lmarie79

Consistency amongst implementations and clarity are most important. A null hash being H() is best, but this can be deferred until 2.0 as long as re eliminate inconsistencies and ambiguities now.

benaloh avatar Feb 28 '22 23:02 benaloh