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

♻️ Hash of Manifest should include candidates #225

Open
1 task done
keithrfung opened this issue Feb 16, 2022 · 4 comments
Open
1 task done

♻️ Hash of Manifest should include candidates #225

keithrfung opened this issue Feb 16, 2022 · 4 comments
Labels
enhancement New feature or request question Further information is requested

Comments

@keithrfung
Copy link
Collaborator

Is there an existing issue for this?

  • I have searched the existing issues

Suggestion

This is an update for documentation of hashing and proposing changes for 2.0.

The hash of the Manifest done in both languages does not include the contests. This seems like a necessity.

    def crypto_hash(self) -> ElementModQ:
        """
        Returns a hash of the metadata components of the election
        """
        hash = hash_elems(
            self.election_scope_id,
            str(self.type.name),
            to_iso_date_string(self.start_date),
            to_iso_date_string(self.end_date),
            self.name,
            self.contact_information,
            self.geopolitical_units,
            self.parties,
            self.contests,
            self.ballot_styles,
        )
        log_debug(f"{self.__class__} : crypto_hash: {hash.to_hex()}")
        return hash

Possible Implementation

No response

Anything else?

Original Issue by @JohnLCaron
Election-Tech-Initiative/electionguard-python#523

@keithrfung keithrfung added enhancement New feature or request triage Waiting to be triaged labels Feb 16, 2022
@JohnLCaron
Copy link
Collaborator

I think this should be

Hash of Manifest should include candidates

@keithrfung keithrfung changed the title ♻️ Hash of Manifest should include contests ♻️ Hash of Manifest should include candidates Mar 4, 2022
@keithrfung
Copy link
Collaborator Author

@JohnLCaron Thanks for keeping me honest.

@JohnLCaron
Copy link
Collaborator

Along the same lines, CandidateContestDescription does not include primary_party_ids in crypto_hash.
For simplicity, one could remove CandidateContestDescription and include an optional primary_party_ids in ContestDescription.

@keithrfung keithrfung added question Further information is requested and removed triage Waiting to be triaged labels May 13, 2022
@keithrfung
Copy link
Collaborator Author

I think this is also something overall discussed for ElectionGuard 2.0

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request question Further information is requested
Projects
None yet
Development

No branches or pull requests

2 participants