Key Ceremony Trustee

typedef struct KeyCeremony_Trustee_s* KeyCeremony_Trustee

Initialization and Freeing

struct KeyCeremony_Trustee_new_r KeyCeremony_Trustee_new(uint32_t num_trustees, uint32_t threshold, uint32_t index)

Create an new trustee.

struct KeyCeremony_Trustee_new_r

Public Members

KeyCeremony_Trustee_status status
KeyCeremony_Trustee trustee
void KeyCeremony_Trustee_free(KeyCeremony_Trustee t)

Free a trustee.

Key Generation

struct KeyCeremony_Trustee_generate_key_r KeyCeremony_Trustee_generate_key(KeyCeremony_Trustee t)

Generate a key pair and return the key_generated_message to be passed to the coordinator.

struct KeyCeremony_Trustee_generate_key_r

Public Members

KeyCeremony_Trustee_status status
struct key_generated_message message

Share Generation

struct KeyCeremony_Trustee_generate_shares_r KeyCeremony_Trustee_generate_shares(KeyCeremony_Trustee t, struct all_keys_received_message in_message)

Verify in_message to ensure:

  • that this trustee’s public key is present
  • that any NIZKPs are valid

Then, compute and encrypt the shares of this trustee’s private key for the other trustees.

struct KeyCeremony_Trustee_generate_shares_r

Public Members

KeyCeremony_Trustee_status status
struct shares_generated_message message

Verification

struct KeyCeremony_Trustee_verify_shares_r KeyCeremony_Trustee_verify_shares(KeyCeremony_Trustee t, struct all_shares_received_message in_message)

Verify that the private key shares in in_message match the commitments in the previously received public keys.

struct KeyCeremony_Trustee_verify_shares_r

State Export

struct KeyCeremony_Trustee_export_state_r KeyCeremony_Trustee_export_state(KeyCeremony_Trustee t)

Export the portion of the trustee’s state that will be necessary for decryption.

struct KeyCeremony_Trustee_export_state_r

Status Codes

enum KeyCeremony_Trustee_status

Values:

KEYCEREMONY_TRUSTEE_SUCCESS
KEYCEREMONY_TRUSTEE_INSUFFICIENT_MEMORY
KEYCEREMONY_TRUSTEE_INVALID_PARAMS
KEYCEREMONY_TRUSTEE_PUBLISHED_PUBLIC_KEY_ERROR
KEYCEREMONY_TRUSTEE_MISSING_PUBLIC_KEY
KEYCEREMONY_TRUSTEE_BAD_NIZKP
KEYCEREMONY_TRUSTEE_INVALID_KEY_SHARE
KEYCEREMONY_TRUSTEE_SERIALIZE_ERROR
KEYCEREMONY_TRUSTEE_DESERIALIZE_ERROR