Example #1
0
        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));
        }
Example #2
0
        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));
        }
Example #3
0
        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));
        }