Fix compilation with GFP_MOD_SZ other than two.

This commit is contained in:
Marcel Keller
2020-03-27 12:14:55 +11:00
parent 11bb860b9d
commit cb8e46d2f3
3 changed files with 7 additions and 7 deletions

View File

@@ -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;

View File

@@ -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>>;

View File

@@ -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;
@@ -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;