ABY Framework  1.0
Arithmetic Bool Yao Framework
 All Classes Files Functions Variables Enumerations Enumerator Macros
phasing_circuit.h
Go to the documentation of this file.
1 
18 #ifndef __PHASING_CIRCUIT_
19 #define __PHASING_CIRCUIT_
20 
21 #include "../../../abycore/circuit/booleancircuits.h"
22 #include "../../../abycore/circuit/arithmeticcircuits.h"
23 #include "../../../abycore/circuit/circuit.h"
24 #include "../../../abycore/aby/abyparty.h"
25 #include "hashing/cuckoo.h"
26 #include "hashing/hashing_util.h"
27 #include "hashing/simple_hashing.h"
28 #include <cassert>
29 
30 int32_t test_phasing_circuit(e_role role, char* address, seclvl seclvl,
31  uint32_t nvals, uint32_t bitlen, double epsilon, uint32_t nthreads, e_mt_gen_alg mt_alg,
32  e_sharing sharing);
33 
34 void sample_random_elements(uint32_t neles, uint32_t bitlen, uint32_t* srv_set, uint32_t* cli_set);
35 void set_fixed_elements(uint32_t neles, uint32_t bitlen, uint32_t* srv_set, uint32_t* cli_set);
36 
37 share* BuildPhasingCircuit(share** shr_srv_set, share* shr_cli_set, uint32_t binsize,
38  BooleanCircuit* circ);
39 
40 share* BuildPhasingStashCircuit(share* shr_srv_set, share** shr_cli_stash, uint32_t neles, uint32_t bitlen,
41  uint32_t maxstashsize, BooleanCircuit* circ);
42 
43 void ServerHashingRoutine(uint8_t* elements, uint32_t neles, uint32_t elebitlen, uint32_t nbins,
44  uint32_t* maxbinsize, uint8_t** hash_table, uint32_t* outbitlen, uint32_t ntasks, crypto* crypt);
45 
46 void ClientHashingRoutine(uint8_t* elements, uint32_t neles, uint32_t elebitlen, uint32_t nbins,
47  uint8_t** hash_table, uint32_t* inv_perm, uint32_t* outbitlen, uint8_t** stash, uint32_t maxstashsize,
48  uint32_t** stashperm, uint32_t ntasks, crypto* crypt);
49 
50 void pad_elements(uint8_t* hash_table, uint32_t elebytelen, uint32_t nbins, uint32_t* nelesinbin,
51  uint32_t maxbinsize, uint8_t* padded_hash_table, uint8_t* dummy_element);
52 
53 uint32_t compute_max_stash_size(uint32_t neles, uint32_t nbins);
54 
55 #endif /* __PHASING_CIRCUIT_ */
Definition: booleancircuits.h:27
Definition: crypto.h:58
e_mt_gen_alg
Enumeration which defines the method that is used for arithmetic multiplication triple generation...
Definition: constants.h:55
Definition: circuit.h:258
e_role
Defines the role of the party or the source / target for certain operations (e.g., input/output)
Definition: constants.h:139
Definition: typedefs.h:79
e_sharing
Enumeration which defines the different sharing which are there in the framework. ...
Definition: constants.h:124