36 #define TC_GET_OCTETS(z, bcount, op) mpz_import(z, bcount, 1, 1, 0, 0, op) 37 #define TC_TO_OCTETS(count, op) mpz_export(NULL, count, 1, 1, 0, 0, op) 38 #define TC_ID_TO_INDEX(id) (id-1) 40 #define TC_MPZ_TO_BYTES(bytes, z) \ 41 do { bytes_t * b = (bytes); size_t * len = (size_t*)&b->data_len; b->data = TC_TO_OCTETS(len, z); } while(0) 42 #define TC_BYTES_TO_MPZ(z, bytes) \ 43 do { const bytes_t * __b = (bytes); size_t len = __b->data_len; mpz_import(z, len, 1, 1, 0, 0, __b->data); } while(0) 45 void *
alloc(
size_t size);
Structure that's stores a pointer that points to data_len bytes.
Structure that represents a signature share, to be joined generating a standard RSA signatures...
Structure that represents a standard RSA public key. Used to verify signatures.
public_key_t * tc_init_public_key()
key_share_t ** tc_init_key_shares(key_metainfo_t *info)
key_share_t * tc_init_key_share()
signature_share_t * tc_init_signature_share()
void * alloc(size_t size)
Structure that represents one key share, to be used to generate a signature share.
key_metainfo_t * tc_init_key_metainfo(uint16_t k, uint16_t l)