Next: , Previous: , Up: Examples   [Contents][Index]

3.2 Setup Communication Channels

Some multiparty protocols require additional asynchronous point-to-point communication channels (authenticated and private) and a reliable broadcast channel. The following example shows, how to setup these channels for player P_i:

// create asynchronous private unicast channels
aiounicast_select *aiou = new aiounicast_select(5, i, uP_in, uP_out, uP_key,
  aiounicast::aio_scheduler_roundrobin, aiounicast::aio_timeout_short);

// create asynchronous private broadcast channels
aiounicast_select *aiou2 = new aiounicast_select(5, i, bP_in, bP_out, bP_key,
  aiounicast::aio_scheduler_roundrobin, aiounicast::aio_timeout_short);
// create an instance of a reliable broadcast protocol (RBC)
std::string myID = "example-poker-libTMCG-reference-manual";
CachinKursawePetzoldShoupRBC *rbc = new CachinKursawePetzoldShoupRBC(5, 1, i, 
  aiou2, aiounicast::aio_scheduler_roundrobin, aiounicast::aio_timeout_short);

We assume that pairwise private keys (e.g. passphrases) have been exchanged (i.e. vector uP_key resp. bP_key) and point-to-point links (i.e. input file descriptors in vector uP_in resp. bP_in and output file descriptors in vector uP_out resp. bP_out) have been already established.