Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
lmarie79 opened this issue Feb 8, 2022 · 4 comments
Open

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

lmarie79 opened this issue Feb 8, 2022 · 4 comments
Assignees
Labels
bug Something isn't working invalid This doesn't seem right question Further information is requested

Comments

@lmarie79
Copy link
Collaborator

lmarie79 commented Feb 8, 2022

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 lmarie79 added enhancement New feature or request triage Waiting to be triaged labels Feb 8, 2022
@lmarie79 lmarie79 changed the title Update null hash to be consistent Null hashes don't match between Python and C++ Feb 8, 2022
@keithrfung keithrfung changed the title Null hashes don't match between Python and C++ ✨ Null hashes don't match between Python and C++ Feb 8, 2022
@keithrfung keithrfung added the question Further information is requested label Feb 8, 2022
@keithrfung
Copy link
Collaborator

keithrfung commented Feb 8, 2022

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

@keithrfung
Copy link
Collaborator

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 keithrfung added bug Something isn't working invalid This doesn't seem right question Further information is requested and removed triage Waiting to be triaged question Further information is requested enhancement New feature or request labels Feb 8, 2022
@lmarie79
Copy link
Collaborator Author

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

@benaloh
Copy link

benaloh commented Feb 28, 2022

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working invalid This doesn't seem right question Further information is requested
Projects
None yet
Development

No branches or pull requests

4 participants