Related to #78
In order to help the eventual separation of xtt using tpm and xtt without a tpm, we could create a group_context that abstracts away the implementation of daa (software or tpm) that we use.
Proposed changes to xtt_client_group_context:
struct xtt_client_group_context {
xtt_group_id gid;
unsigned char basename[MAX_BASENAME_LENGTH];
struct xtt_signing_context_{tpm OR software_daa}; //this is the "private key"
}
struct xtt_signing_context_tpm {
union {
xtt_daa_credential_lrsw lrsw;
} cred;
TPM_HANDLE key_handle;
char key_password[MAX_TPM_PASSWORD_LENGTH];
uint16_t key_password_length;
TSS2_TCTI_CONTEXT *tcti_context;
}
struct xtt_signing_context_software_daa { //better name to come
union {
xtt_daa_credential_lrsw lrsw;
} cred;
union {
xtt_daa_priv_key_lrsw lrsw;
} priv_key;
}
This should decrease the number of #ifdefs we need.
Related to #78
In order to help the eventual separation of xtt using tpm and xtt without a tpm, we could create a group_context that abstracts away the implementation of daa (software or tpm) that we use.
Proposed changes to
xtt_client_group_context:This should decrease the number of
#ifdefs we need.