Skip to content

Commit

Permalink
Bugfixes.
Browse files Browse the repository at this point in the history
  • Loading branch information
mkskeller committed Sep 12, 2018
1 parent b8d6211 commit 72d0c71
Show file tree
Hide file tree
Showing 5 changed files with 6 additions and 6 deletions.
2 changes: 1 addition & 1 deletion FHE/P2Data.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ void P2Data::backward(vector<gf2n_short>& ans,const vector<int>& a) const
{ y<<=1;
int ii=i*n+n-1-j,xx=0;
for (unsigned int k=0; k<a.size(); k++)
{ if (a[k]==1 && Ai[ii][k]==1) { xx^=1; } }
{ if ((a[k] & 1) && Ai[ii][k]==1) { xx^=1; } }
y^=xx;
}
ans[i].assign(y);
Expand Down
2 changes: 1 addition & 1 deletion FHEOffline/DataSetup.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -272,8 +272,8 @@ void PartSetup<FD>::unpack(octetStream& os)
pk.unpack(os);
sk.unpack(os);
calpha.unpack(os);
alphai.unpack(os);
init_field();
alphai.unpack(os);
}

template <>
Expand Down
4 changes: 2 additions & 2 deletions FHEOffline/Producer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -386,7 +386,7 @@ void InverseProducer<FD>::run(const Player& P, const FHE_PK& pk, const Ciphertex
// Steps e and f
Ciphertext cab(params),cc(params);
mul(cab,ca,cb,pk);
dd.run(cab);
dd.run(cab, true);
ab = dd.mf;

if (produce_triples)
Expand Down Expand Up @@ -451,7 +451,7 @@ void gfpBitProducer::run(const Player& P, const FHE_PK& pk,
// Steps c and d
Ciphertext caa(params);
mul(caa, ca, ca, pk);
Plaintext_<FFT_Data>& s = dd.run(caa);
Plaintext_<FFT_Data>& s = dd.run(caa, true);

// Step e, f and g
vector<int> marks(s.num_slots());
Expand Down
2 changes: 1 addition & 1 deletion FHEOffline/SimpleGenerator.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ SimpleGenerator<T,FD>::SimpleGenerator(const Names& N, const PartSetup<FD>& setu
thread_num, machine.output);
break;
case DATA_BIT:
producer = new_bit_producer(setup.FieldD, P, setup.pk, true,
producer = new_bit_producer(setup.FieldD, P, setup.pk, 0, true,
thread_num, machine.output);
break;
case DATA_INVERSE:
Expand Down
2 changes: 1 addition & 1 deletion OT/Tools.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ void random_seed_commit(octet* seed, TwoPartyPlayer& player, int len)
vector<octetStream> Open_seed(2);
G.get_octetStream(seed_strm[0], len);

Commit(Comm_seed[0], Open_seed[0], seed_strm[0], player.my_num());
Commit(Comm_seed[0], Open_seed[0], seed_strm[0], player.my_real_num());
player.send_receive_player(Comm_seed);
player.send_receive_player(Open_seed);

Expand Down

0 comments on commit 72d0c71

Please sign in to comment.