#include <stddef.h>
#include "tc.h"
Go to the source code of this file.
|
struct | public_key |
| Structure that represents a standard RSA public key. Used to verify signatures. More...
|
|
struct | key_metainfo |
| Structure that represents the data about a key share, including its public key. More...
|
|
struct | key_share |
| Structure that represents one key share, to be used to generate a signature share. More...
|
|
struct | signature_share |
| Structure that represents a signature share, to be joined generating a standard RSA signatures. More...
|
|
|
#define | TC_GET_OCTETS(z, bcount, op) mpz_import(z, bcount, 1, 1, 0, 0, op) |
|
#define | TC_TO_OCTETS(count, op) mpz_export(NULL, count, 1, 1, 0, 0, op) |
|
#define | TC_ID_TO_INDEX(id) (id-1) |
|
#define | TC_MPZ_TO_BYTES(bytes, z) do { bytes_t * b = (bytes); size_t * len = (size_t*)&b->data_len; b->data = TC_TO_OCTETS(len, z); } while(0) |
|
#define | TC_BYTES_TO_MPZ(z, bytes) do { const bytes_t * __b = (bytes); size_t len = __b->data_len; mpz_import(z, len, 1, 1, 0, 0, __b->data); } while(0) |
|
#define TC_BYTES_TO_MPZ |
( |
|
z, |
|
|
|
bytes |
|
) |
| do { const bytes_t * __b = (bytes); size_t len = __b->data_len; mpz_import(z, len, 1, 1, 0, 0, __b->data); } while(0) |
#define TC_GET_OCTETS |
( |
|
z, |
|
|
|
bcount, |
|
|
|
op |
|
) |
| mpz_import(z, bcount, 1, 1, 0, 0, op) |
#define TC_ID_TO_INDEX |
( |
|
id | ) |
(id-1) |
#define TC_MPZ_TO_BYTES |
( |
|
bytes, |
|
|
|
z |
|
) |
| do { bytes_t * b = (bytes); size_t * len = (size_t*)&b->data_len; b->data = TC_TO_OCTETS(len, z); } while(0) |
#define TC_TO_OCTETS |
( |
|
count, |
|
|
|
op |
|
) |
| mpz_export(NULL, count, 1, 1, 0, 0, op) |
void* alloc |
( |
size_t |
size | ) |
|