101 hcs_random *hr,
const unsigned long s,
const unsigned long bits,
102 const unsigned long l,
const unsigned long w);
183 const unsigned long x);
228 mpz_t rop, mpz_t cipher1);
Provides secure random state for use in functions which require random values.
void djcs_t_clear_public_key(djcs_t_public_key *pk)
Clears all data in a djcs_t_public_key.
void djcs_t_free_auth_server(djcs_t_auth_server *au)
Frees a djcs_t_auth_server and all associated memory.
mpz_t * djcs_t_init_polynomial(djcs_t_private_key *vk, hcs_random *hr)
Allocate and initialise the values in a random polynomial.
mpz_t qh
A random prime such that q = 2*qh + 1.
Definition: djcs_t.h:57
djcs_t_auth_server * djcs_t_init_auth_server(void)
Initialise a djcs_t_auth_server and return a pointer to the newly created structure.
void djcs_t_compute_polynomial(djcs_t_private_key *vk, mpz_t *coeff, mpz_t rop, const unsigned long x)
Compute a polynomial P(x) for a given x value in the required finite field.
mpz_t g
Precomputation: n + 1 usually, may be 2.
Definition: djcs_t.h:39
mpz_t d
d = 0 mod m and d = 1 mod n^2
Definition: djcs_t.h:53
mpz_t si
The polynomial evaluation at i.
Definition: djcs_t.h:30
void djcs_t_free_polynomial(djcs_t_private_key *vk, mpz_t *coeff)
Frees a given polynomial (array of mpz_t values) and all associated data.
Details that a decryption server is required to keep track of.
Definition: djcs_t.h:28
unsigned long l
The number of decryption servers.
Definition: djcs_t.h:48
djcs_t_private_key * djcs_t_init_private_key(void)
Initialise a djcs_private_key and return a pointer to the newly created structure.
void djcs_t_free_private_key(djcs_t_private_key *vk)
Frees a djcs_t_private_key and all associated memory.
unsigned long s
Ciphertext space exponent.
Definition: djcs_t.h:37
void djcs_t_free_public_key(djcs_t_public_key *pk)
Frees a djcs_t_public_key and all associated memory.
unsigned long s
Ciphertext space exponent.
Definition: djcs_t.h:46
mpz_t * n
Modulus of the key.
Definition: djcs_t.h:38
mpz_t m
Precomputation: ph * qh.
Definition: djcs_t.h:58
unsigned long i
The server index of this particular instance.
Definition: djcs_t.h:29
void djcs_t_encrypt(djcs_t_public_key *pk, hcs_random *hr, mpz_t rop, mpz_t plain1)
Encrypt a value plain1, and set rop to the encrypted result.
mpz_t * n
Modulus; Higher powers are precomputed.
Definition: djcs_t.h:50
mpz_t * vi
Verification values for the decrypt servers.
Definition: djcs_t.h:49
mpz_t delta
Precomputation: l!
Definition: djcs_t.h:52
void djcs_t_reencrypt(djcs_t_public_key *pk, hcs_random *hr, mpz_t rop, mpz_t op)
Reencrypt an encrypted value op.
mpz_t v
Cyclic generator of squares in Z*n^2.
Definition: djcs_t.h:51
mpz_t q
A random prime determined during key generation.
Definition: djcs_t.h:56
void djcs_t_ep_add(djcs_t_public_key *pk, mpz_t rop, mpz_t cipher1, mpz_t plain1)
Add a plaintext value plain1 to an encrypted value cipher1, storing the result in rop...
djcs_t_public_key * djcs_t_init_public_key(void)
Initialise a djcs_t_public_key and return a pointer to the newly created structure.
mpz_t nsm
Precomputation: n * m.
Definition: djcs_t.h:59
void djcs_t_generate_key_pair(djcs_t_public_key *pk, djcs_t_private_key *vk, hcs_random *hr, const unsigned long s, const unsigned long bits, const unsigned long l, const unsigned long w)
Initialise a key pair with modulus size bits.
mpz_t ph
A random prime such that p = 2*ph + 1.
Definition: djcs_t.h:55
void djcs_t_share_combine(djcs_t_private_key *vk, mpz_t rop, mpz_t *c)
Combine an array of shares c, storing the result in rop.
void djcs_t_set_auth_server(djcs_t_auth_server *au, mpz_t si, unsigned long i)
Set the internal values for the server au.
Public key for use in the Threshold Damgard-Jurik system.
Definition: djcs_t.h:36
void djcs_t_clear_private_key(djcs_t_private_key *vk)
Clears all data in a djcs_t_private_key.
void djcs_t_ee_add(djcs_t_public_key *pk, mpz_t rop, mpz_t cipher1, mpz_t cipher2)
Add an encrypted value cipher2 to an encrypted value cipher1, storing the result in rop...
unsigned long w
The number of servers req to decrypt.
Definition: djcs_t.h:47
void djcs_t_share_decrypt(djcs_t_private_key *vk, djcs_t_auth_server *au, mpz_t rop, mpz_t cipher1)
For a given ciphertext cipher1, compute the server au's share and store the result in the variable ro...
mpz_t p
A random prime determined during key generation.
Definition: djcs_t.h:54
void djcs_t_ep_mul(djcs_t_public_key *pk, mpz_t rop, mpz_t cipher1, mpz_t plain1)
Multiply a plaintext value plain1 with an encrypted value cipher1, storing the result in rop...
Private key for use in the Threshold Damgard-Jurik system.
Definition: djcs_t.h:45
Random state used by a number of cryptographic functions.
Definition: hcs_random.h:39