Skip to content

Commit

Permalink
Fix compilation with GFP_MOD_SZ other than two.
Browse files Browse the repository at this point in the history
  • Loading branch information
mkskeller committed Mar 27, 2020
1 parent 11bb860 commit cb8e46d
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 7 deletions.
6 changes: 3 additions & 3 deletions FHEOffline/Proof.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -180,6 +180,6 @@ void Proof::Preimages::check_sizes()
throw runtime_error("preimage sizes don't match");
}

template bool Proof::check_bounds(AddableVector<fixint<2>>& z, AddableMatrix<fixint<0>>& t, int i) const;
template bool Proof::check_bounds(AddableVector<fixint<2>>& z, AddableMatrix<fixint<1>>& t, int i) const;
template bool Proof::check_bounds(AddableVector<fixint<2>>& z, AddableMatrix<fixint<2>>& t, int i) const;
template bool Proof::check_bounds(AddableVector<fixint<GFP_MOD_SZ>>& z, AddableMatrix<fixint<0>>& t, int i) const;
template bool Proof::check_bounds(AddableVector<fixint<GFP_MOD_SZ>>& z, AddableMatrix<fixint<1>>& t, int i) const;
template bool Proof::check_bounds(AddableVector<fixint<GFP_MOD_SZ>>& z, AddableMatrix<fixint<2>>& t, int i) const;
4 changes: 2 additions & 2 deletions FHEOffline/Verifier.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -114,5 +114,5 @@ void Verifier<FD,S>::NIZKPoK(AddableVector<Ciphertext>& c,
}


template class Verifier<FFT_Data, fixint<2>>;
template class Verifier<P2Data, fixint<2>>;
template class Verifier<FFT_Data, fixint<GFP_MOD_SZ>>;
template class Verifier<P2Data, fixint<GFP_MOD_SZ>>;
4 changes: 2 additions & 2 deletions Tools/random.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -243,7 +243,7 @@ void PRNG::randomBnd(bigint& x, const bigint& B, bool positive)
}

template<>
void PRNG::randomBnd(fixint<2>& x, const bigint& B, bool positive)
void PRNG::randomBnd(fixint<GFP_MOD_SZ>& x, const bigint& B, bool positive)
{
randomBnd(bigint::tmp, B, positive);
x = bigint::tmp;
Expand Down Expand Up @@ -288,7 +288,7 @@ void PRNG::get(fixint<0>& res, int n_bits, bool positive)
}

template<>
void PRNG::get(fixint<2>& res, int n_bits, bool positive)
void PRNG::get(fixint<GFP_MOD_SZ>& res, int n_bits, bool positive)
{
get(bigint::tmp, n_bits, positive);
res = bigint::tmp;
Expand Down

0 comments on commit cb8e46d

Please sign in to comment.