Decryption Trustee

typedef struct Decryption_Trustee_s* Decryption_Trustee

Initialization and Freeing

struct Decryption_Trustee_new_r Decryption_Trustee_new(uint32_t num_trustees, uint32_t threshold, uint32_t num_selections, struct trustee_state state)

Create a new trustee.

Does not free the trustee state.

struct Decryption_Trustee_new_r

Public Members

Decryption_Trustee_status status
Decryption_Trustee decryptor
void Decryption_Trustee_free(Decryption_Trustee d)

Free a trustee.

Tallying

enum Decryption_Trustee_status Decryption_Trustee_tally_voting_record(Decryption_Trustee d, FILE * in)

Parse a voting record, tally it, and store the encrypted tally of all the votes.

Announcing

struct Decryption_Trustee_compute_share_r Decryption_Trustee_compute_share(Decryption_Trustee d)

Decrypt this trustee’s share of the tally.

struct Decryption_Trustee_compute_share_r

Public Members

Decryption_Trustee_status status
struct decryption_share share

Compensating

struct Decryption_Trustee_compute_fragments_r Decryption_Trustee_compute_fragments(Decryption_Trustee d, struct decryption_fragments_request req)

Decrypt this trustee’s fragment of another trustee’s share of the tally.

struct Decryption_Trustee_compute_fragments_r

Public Members

Decryption_Trustee_status status
struct decryption_fragments fragments

Status Codes

enum Decryption_Trustee_status

Values:

DECRYPTION_TRUSTEE_SUCCESS
DECRYPTION_TRUSTEE_INSUFFICIENT_MEMORY
DECRYPTION_TRUSTEE_INVALID_PARAMS
DECRYPTION_TRUSTEE_IO_ERROR
DECRYPTION_TRUSTEE_MALFORMED_INPUT
DECRYPTION_TRUSTEE_SERIALIZE_ERROR
DECRYPTION_TRUSTEE_DESERIALIZE_ERROR