public CiphertextElectionContext ElectionContext(ElectionDescription description, string elgamal_public_key, int number_of_guardians, int quorum) { var ctxt = new ElectionContextRequest() { description = description, elgamal_public_key = elgamal_public_key, number_of_guardians = number_of_guardians, quorum = quorum }; return(PostRequest <CiphertextElectionContext, ElectionContextRequest>("/api/v1/election/context", ctxt)); }
public PublishedPlaintextTally TallyDecrypt(CiphertextElectionContext context, ElectionDescription description, PublishedCiphertextTally encrypted_tally, Dictionary <string, TallyDecryptionShare> shares) { var ctxt = new DecryptTallyRequest() { context = context, description = description, encrypted_tally = encrypted_tally, shares = shares }; return(PostRequest <PublishedPlaintextTally, DecryptTallyRequest>("/api/v1/tally/decrypt", ctxt)); }
public EncryptBallotsResponse BallotEncrypt(PlaintextBallot[] ballots, CiphertextElectionContext context, ElectionDescription description, string nonce, string seed_hash) { var ctxt = new EncryptBallotsRequest() { ballots = ballots, context = context, description = description, nonce = nonce, seed_hash = seed_hash }; return(PostRequest <EncryptBallotsResponse, EncryptBallotsRequest>("/api/v1/ballot/encrypt", ctxt)); }
public PublishedCiphertextTally TallyAppend(CiphertextAcceptedBallot[] ballots, CiphertextElectionContext context, ElectionDescription description, PublishedCiphertextTally encrypted_tally) { var ctxt = new AppendTallyRequest() { ballots = ballots, context = context, description = description, encrypted_tally = encrypted_tally }; return(PostRequest <PublishedCiphertextTally, AppendTallyRequest>("/api/v1/tally/append", ctxt)); }
public PublishedCiphertextTally Tally(CiphertextAcceptedBallot[] ballots, CiphertextElectionContext context, ElectionDescription description) { var ctxt = new StartTallyRequest() { ballots = ballots, context = context, description = description }; return(PostRequest <PublishedCiphertextTally, StartTallyRequest>("/api/v1/tally", ctxt)); }
public CiphertextAcceptedBallot BallotSpoil(CiphertextBallot ballot, CiphertextElectionContext context, ElectionDescription description) { var ctxt = new AcceptBallotRequest() { ballot = ballot, context = context, description = description }; return(PostRequest <CiphertextAcceptedBallot, AcceptBallotRequest>("/api/v1/ballot/spoil", ctxt)); }
public async Task <CiphertextAcceptedBallot> BallotSpoilAsync(CiphertextBallot ballot, CiphertextElectionContext context, ElectionDescription description) { var ctxt = new AcceptBallotRequest() { ballot = ballot, context = context, description = description }; return(await PostRequestAsync <CiphertextAcceptedBallot, AcceptBallotRequest>("/api/v1/ballot/spoil", ctxt)); }
public TallyDecryptionShare TallyDecryptShare(CiphertextElectionContext context, ElectionDescription description, PublishedCiphertextTally encrypted_tally, Guardian guardian) { var ctxt = new DecryptTallyShareRequest() { context = context, description = description, encrypted_tally = encrypted_tally, guardian = guardian }; return(PostRequest <TallyDecryptionShare, DecryptTallyShareRequest>("/api/v1/tally/decrypt-share", ctxt)); }