1234567891011121314151617181920212223 |
- #ifndef __PRSONA_SERVER_HPP
- #define __PRSONA_SERVER_HPP
- class PrsonaServer {
- public:
- PrsonaServer();
- void add_new_client(PrsonaPublicKey longTermPublicKey);
- void epoch();
- void receive_vote(vector<CurveBipoint> vote, Proof pi, PrsonaPublicKey shortTermPublicKey);
- private:
- PrsonaPrivateKey longTermPrivateKey;
- BGNPrivateKey bgnPrivateKey;
- vector<TwistBipoint> previousVoteTally;
- vector<vector<CurveBipoint>> voteMatrix;
- void calculate_vote_tally();
- void rerandomize_vote_matrix();
- void distribute_new_scores();
- bool verify_vote_proof(CurveBipoint vote, Proof pi, PrsonaPublicKey shortTermPublicKey);
- };
- #endif
|