10 void * b = malloc(size);
28 out->
data = memcpy(malloc(len), bs, len);
34 static bytes_t * tc_init_bytes_array(
size_t len) {
48 void *data = bytes->
data;
54 static void tc_clear_bytes_array(
bytes_t * b,
int count) {
55 for(
int i=0; i<count; i++) {
68 while((cur_arg = va_arg(ap,
bytes_t *)) != NULL) {
92 assert(l/2 < k && k <= l);
100 metainfo->
vk_i = tc_init_bytes_array(l);
104 assert(metainfo != NULL);
137 assert(info != NULL);
141 tc_clear_bytes_array(info->
vk_i, info->
l);
155 assert(info != NULL);
159 for(
int i=0; i<info->
l; i++) {
173 assert(info != NULL && info->
l > 0);
174 for(
int i=0; i<info->
l; i++) {
void tc_clear_bytes(bytes_t *bytes)
void tc_clear_key_metainfo(key_metainfo_t *info)
public_key_t * tc_init_public_key()
int tc_key_meta_info_k(const key_metainfo_t *i)
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...
key_share_t * tc_init_key_share()
void tc_clear_key_share(key_share_t *share)
void tc_clear_bytes_n(bytes_t *bytes,...)
const public_key_t * tc_key_meta_info_public_key(const key_metainfo_t *i)
bytes_t * tc_init_bytes_copy(void *bs, size_t len)
signature_share_t * tc_init_signature_share()
void tc_clear_public_key(public_key_t *pk)
Structure that represents a standard RSA public key. Used to verify signatures.
int tc_key_meta_info_l(const key_metainfo_t *i)
const bytes_t * tc_public_key_e(const public_key_t *pk)
key_metainfo_t * tc_init_key_metainfo(uint16_t k, uint16_t l)
int tc_key_share_id(const key_share_t *k)
void * alloc(size_t size)
void * tc_release_bytes(bytes_t *bytes, uint32_t *len)
int tc_signature_share_id(const signature_share_t *s)
void tc_clear_key_shares(key_share_t **shares, key_metainfo_t *info)
Structure that represents one key share, to be used to generate a signature share.
const bytes_t * tc_public_key_n(const public_key_t *pk)
bytes_t * tc_init_bytes(void *bs, size_t len)
key_share_t ** tc_init_key_shares(key_metainfo_t *info)
void tc_clear_signature_share(signature_share_t *ss)