mirror of
https://github.com/data61/MP-SPDZ.git
synced 2026-01-10 05:57:57 -05:00
Fix compilation with GFP_MOD_SZ other than two.
This commit is contained in:
@@ -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;
|
||||
|
||||
@@ -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>>;
|
||||
|
||||
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user