File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 4444from .schnorr import SchnorrProof
4545from .tally import CiphertextTally
4646from .types import BALLOT_ID , GUARDIAN_ID
47- from .utils import get_optional
4847
4948
5049@dataclass
@@ -511,9 +510,11 @@ def publish_joint_key(self) -> Optional[ELECTION_JOINT_PUBLIC_KEY]:
511510 )
512511 return elgamal_combine_public_keys (public_keys )
513512
514- def share_other_guardian_key (self , guardian_id : GUARDIAN_ID ) -> ElectionPublicKey :
515- """Share other guardians keys shared during key ceremony."""
516- return get_optional (self ._guardian_election_public_keys .get (guardian_id ))
513+ def share_other_guardian_key (
514+ self , guardian_id : GUARDIAN_ID
515+ ) -> Optional [ElectionPublicKey ]:
516+ """Share other guardians keys shared during key ceremony"""
517+ return self ._guardian_election_public_keys .get (guardian_id )
517518
518519 def compute_tally_share (
519520 self , tally : CiphertextTally , context : CiphertextElectionContext
Original file line number Diff line number Diff line change 6060
6161from electionguardtest .ballot_factory import BallotFactory
6262from electionguardtest .election_factory import ElectionFactory , NUMBER_OF_GUARDIANS
63- from electionguardtest .identity_encrypt import identity_auxiliary_encrypt
63+ from electionguardtest .identity_encrypt import (
64+ identity_auxiliary_encrypt ,
65+ identity_auxiliary_decrypt ,
66+ )
6467
6568RESULTS_DIR = "test-results"
6669DEVICES_DIR = path .join (RESULTS_DIR , "devices" )
@@ -249,7 +252,7 @@ def step_1_key_ceremony(self) -> None:
249252 if designated_guardian .id is not backup_owner .id :
250253 verification = (
251254 designated_guardian .verify_election_partial_key_backup (
252- backup_owner .id , identity_auxiliary_encrypt
255+ backup_owner .id , identity_auxiliary_decrypt
253256 )
254257 )
255258 verifications .append (get_optional (verification ))
You can’t perform that action at this time.
0 commit comments