betteryao/BetterYao5-hbc.cpp
void BetterYao5::generate_random_seeds(std::vector<Bytes> & seeds,uint32_t num_seeds){
 
  Bytes rand;
  G rand_elem;
  //Prng prng = Prng();
  
  seeds.clear();

  for(int i=0;i<num_seeds;i++){
    // these random elements will be used for OT,
    // so we generate them as random group elements

    
    // this version useful for ALSZ extension
    //rand = prng.rand_bits(Env::elm_size_in_bytes()*8);
    //std::cout << "prng rand element: " << rand.to_hex() << std::endl;
    //seeds.push_back(rand);
    
    rand_elem.random();
    seeds.push_back(rand_elem.to_bytes());
  }
}
/**
   this function generates the randomnesses that will be used to seed the circuit Prngs
   and will be transfered in the special circuit OTs
*/
this function generates the randomnesses that will be used to seed the circuit Prngs
and will be transfered in the special circuit OTs
this function generates the randomnesses that will be used to seed the circuit Prngs and will be transfered in the special circuit OTs
void BetterYao5::generate_random_seeds(std::vector<Bytes> & seeds,uint32_t num_seeds){
  Bytes rand;
  G rand_elem;
  seeds.clear();
  for(int i=0;i<num_seeds;i++){
    rand_elem.random();
    seeds.push_back(rand_elem.to_bytes());
  }
}
void BetterYao5 :: generate_random_seeds ( std :: vector < Bytes > & seeds , uint32_t num_seeds ) { Bytes rand ; G rand_elem ; seeds . clear ( ) ; for ( int i = 0 ; i < num_seeds ; i ++ ) { rand_elem . random ( ) ; seeds . push_back ( rand_elem . to_bytes ( ) ) ; } }
this function generates the randomnesses that will be used to seed the circuit Prngs
and will be transfered in the special circuit OTs
this function generates the randomnesses that will be used to seed the circuit Prngs and will be transfered in the special circuit OTs
//Prng prng = Prng(); // these random elements will be used for OT, // so we generate them as random group elements // this version useful for ALSZ extension //rand = prng.rand_bits(Env::elm_size_in_bytes()*8); //std::cout << "prng rand element: " << rand.to_hex() << std::endl; //seeds.push_back(rand);