Skip to content

Commit

Permalink
Fix compilation with GCC and GFP_MOD_SZ=1.
Browse files Browse the repository at this point in the history
  • Loading branch information
mkskeller committed Jun 8, 2020
1 parent f58580a commit 242f3e7
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion FHE/FHE_Keys.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -402,7 +402,7 @@ template Ciphertext FHE_PK::encrypt(const Plaintext_<P2Data>& mess) const;

template void FHE_PK::encrypt(Ciphertext& c, const vector<int>& mess,
const Random_Coins& rc) const;
template void FHE_PK::encrypt(Ciphertext& c, const vector<fixint<2>>& mess,
template void FHE_PK::encrypt(Ciphertext& c, const vector<fixint<GFP_MOD_SZ>>& mess,
const Random_Coins& rc) const;

template Plaintext_<FFT_Data> FHE_SK::decrypt(const Ciphertext& c,
Expand Down
2 changes: 1 addition & 1 deletion Math/modp.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ bool isOne(const modp_<L>& x,const Zp_Data& ZpD)
}
else
{ if (x.x[0]!=1) { return false; }
for (int i=1; i<ZpD.t; i++)
for (int i=1; i<min(ZpD.t, L); i++)
{ if (x.x[i]!=0) { return false; } }
}
return true;
Expand Down

0 comments on commit 242f3e7

Please sign in to comment.