ABY Framework  1.0
Arithmetic Bool Yao Framework
 All Classes Files Functions Variables Enumerations Enumerator Macros
bgp.h
Go to the documentation of this file.
1 
18 #ifndef __BGP_H_
19 #define __BGP_H_
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 <math.h>
26 #include <cassert>
27 #include <vector>
28 #include <map>
29 #include <algorithm>
30 
31 #define ALICE "ALICE"
32 #define BOB "BOB"
33 
34 typedef map<uint32_t, map<uint32_t, uint8_t> > relmap;
35 typedef map<uint32_t, vector<uint32_t> > topmap;
36 typedef map<uint32_t, uint32_t> nodemap;
37 
38 #define MAX_DISTANCE 30
39 
50 int32_t test_bgp_circuit(e_role role, char* address, seclvl seclvl, uint32_t nvals, uint32_t bitlen, uint32_t nthreads,
51  e_mt_gen_alg mt_alg, e_sharing sharing, const topmap &topology, const relmap &relations, const vector<uint32_t> *oID);
52 
53 
54 int32_t test_bgp_circuit_debug(e_role role, char* address, seclvl seclvl, uint32_t nvals, uint32_t bitlen, uint32_t nthreads,
55  e_mt_gen_alg mt_alg, e_sharing sharing, const topmap &topology, const relmap &relations);
56 
57 int32_t build_customer_circuit(BooleanCircuit *circ, share *custShr, share **F, share **T, share **D, share **NIdx,
58  share* dist, share* zerogate, uint32_t num_as, uint32_t m, uint32_t d_cust, uint32_t** LUT);
59 
60 int32_t build_peer_circuit(BooleanCircuit *circ, share *peerShr, share **F, share **T, share **D, share **NIdx,
61  share* dist, share* max_dist, share* zero_id, uint32_t num_as, uint32_t m, uint32_t** LUT);
62 
63 int32_t build_provider_circuit(BooleanCircuit *circ, share *provShr, share **F, share **T, share **D, share **NIdx,
64  share* dist, share* max_dist, share* zero_id, uint32_t num_as, uint32_t m, uint32_t d_prov, uint32_t** LUT);
65 
66 void plaintextBGP(nodemap &tree, nodemap &dist, CBitVector* finish, const topmap &topology, const relmap &relations, const uint32_t target,
67  const vector<uint32_t> *oID);
68 void plaintextBGP(nodemap &tree, nodemap &dist, CBitVector* finish, const topmap &topology, const relmap &relations, const uint32_t target);
69 
70 
71 void plaintextCustomers(const relmap &relations, CBitVector *finish, map<uint32_t, uint32_t> &dist, map<uint32_t, uint32_t> &tree, const uint32_t max_neighbors);
72 void plaintextPeers(const relmap &relations, CBitVector *finish, map<uint32_t, uint32_t> &dist, map<uint32_t, uint32_t> &tree, const uint32_t max_neighbors);
73 void plaintextProviders(const relmap &relations, CBitVector *finish, map<uint32_t, uint32_t> &dist, map<uint32_t, uint32_t> &tree, const uint32_t max_neighbors);
74 
75 BOOL verifyTree(map<uint32_t, uint32_t> &tree, uint32_t *circOut, uint32_t id_bit_size);
76 BOOL verifyTree(map<uint32_t, uint32_t> &tree, uint32_t *circOut);
77 
78 #endif /* __BGP_H_ */
Definition: booleancircuits.h:27
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
BOOL verifyTree(map< uint32_t, uint32_t > &tree, uint32_t *circOut, uint32_t id_bit_size)
Definition: bgp.cpp:371
Definition: typedefs.h:79
e_sharing
Enumeration which defines the different sharing which are there in the framework. ...
Definition: constants.h:124
int32_t test_bgp_circuit(e_role role, char *address, seclvl seclvl, uint32_t nvals, uint32_t bitlen, uint32_t nthreads, e_mt_gen_alg mt_alg, e_sharing sharing, const topmap &topology, const relmap &relations, const vector< uint32_t > *oID)
Definition: bgp.cpp:677
Definition: cbitvector.h:123