|
libtc
20160415
Threshold Cryptography functions library
|
#include <assert.h>#include <stdarg.h>#include <stdio.h>#include <stdlib.h>#include <string.h>#include "tc_internal.h"Go to the source code of this file.
| void* alloc | ( | size_t | size | ) |
Definition at line 9 of file structs_init.c.
| void tc_clear_bytes | ( | bytes_t * | bytes | ) |
Clears the memory stored in bytes and its structure.
Definition at line 39 of file structs_init.c.
| void tc_clear_bytes_n | ( | bytes_t * | bytes, |
| ... | |||
| ) |
Clears several bytes_t structures at once. The parameter list should end with a NULL sentinel.
Definition at line 61 of file structs_init.c.
| void tc_clear_key_metainfo | ( | key_metainfo_t * | info | ) |
Clears the memory of the structure
Definition at line 136 of file structs_init.c.
| void tc_clear_key_share | ( | key_share_t * | share | ) |
Clears the memory of the structure
Definition at line 167 of file structs_init.c.
| void tc_clear_key_shares | ( | key_share_t ** | shares, |
| key_metainfo_t * | info | ||
| ) |
Clears the memory of all the key shares in the shares structure
Definition at line 172 of file structs_init.c.
| void tc_clear_public_key | ( | public_key_t * | pk | ) |
Definition at line 85 of file structs_init.c.
| void tc_clear_signature_share | ( | signature_share_t * | ss | ) |
Clears the memory of the structure
Definition at line 191 of file structs_init.c.
| bytes_t* tc_init_bytes | ( | void * | bs, |
| size_t | len | ||
| ) |
Function that allocates and initialize a bytes_t structure that contains len bytes in the bs pointer. The bytes_t structure will own the data pointed by bs. Any bytes_t structure initialized by this function should be deinitialized by tc_clear_bytes.
| [in] | bs | pointer to data |
| [in] | len | data stored in len |
Definition at line 18 of file structs_init.c.
| bytes_t* tc_init_bytes_copy | ( | void * | bs, |
| size_t | len | ||
| ) |
Function that allocates and initialize a bytes_t structure that contains a copy of the len bytes stored by the bs pointer. The data stored in the structure is a copy of the original data. Any bytes_t structure initialized by this function should be deinitialized by tc_clear_bytes.
| [in] | bs | pointer to data |
| [in] | len | data stored in len |
Definition at line 26 of file structs_init.c.
| key_metainfo_t* tc_init_key_metainfo | ( | uint16_t | k, |
| uint16_t | l | ||
| ) |
Definition at line 90 of file structs_init.c.
| key_share_t* tc_init_key_share | ( | ) |
Definition at line 145 of file structs_init.c.
| key_share_t** tc_init_key_shares | ( | key_metainfo_t * | info | ) |
Definition at line 154 of file structs_init.c.
| public_key_t* tc_init_public_key | ( | ) |
Definition at line 75 of file structs_init.c.
| signature_share_t* tc_init_signature_share | ( | ) |
Definition at line 180 of file structs_init.c.
| int tc_key_meta_info_k | ( | const key_metainfo_t * | i | ) |
| [in] | i | the metainfo of the key shares array. |
Definition at line 108 of file structs_init.c.
| int tc_key_meta_info_l | ( | const key_metainfo_t * | i | ) |
| [in] | i | the metainfo of the key shares array. |
Definition at line 112 of file structs_init.c.
| const public_key_t* tc_key_meta_info_public_key | ( | const key_metainfo_t * | i | ) |
| [in] | i | the metainfo of the key shares array. |
Definition at line 116 of file structs_init.c.
| int tc_key_share_id | ( | const key_share_t * | k | ) |
| [in] | k | a key share. |
Definition at line 120 of file structs_init.c.
| const bytes_t* tc_public_key_e | ( | const public_key_t * | pk | ) |
| [in] | pk | a public key. |
Definition at line 128 of file structs_init.c.
| const bytes_t* tc_public_key_n | ( | const public_key_t * | pk | ) |
| [in] | pk | a public key. |
Definition at line 124 of file structs_init.c.
| void* tc_release_bytes | ( | bytes_t * | bytes, |
| uint32_t * | len | ||
| ) |
Clears just the bytes structure, and returns a pointer to bytes' data.
| [in] | bytes | the bytes_t structure to be freed. |
| [out] | len | a pointer to store the length of the data stored in bytes. |
Definition at line 44 of file structs_init.c.
| int tc_signature_share_id | ( | const signature_share_t * | s | ) |
| [in] | s | a signature share. |
Definition at line 132 of file structs_init.c.
1.8.11