mirror of
https://github.com/data61/MP-SPDZ.git
synced 2026-01-09 13:37:58 -05:00
Fix bug in MASCOT GF(2^n) bit generation.
This commit is contained in:
@@ -88,10 +88,10 @@ class MascotMultiplier : public OTMultiplier<T>
|
||||
const vector<BitVector>& baseReceiverOutput);
|
||||
|
||||
void multiplyForBits();
|
||||
template <class U>
|
||||
void multiplyForBits(U);
|
||||
template <int X, int L>
|
||||
void multiplyForBits(gfp_<X, L>);
|
||||
template <int = 0>
|
||||
void multiplyForBits(true_type);
|
||||
template <int = 0>
|
||||
void multiplyForBits(false_type);
|
||||
|
||||
public:
|
||||
vector<typename T::open_type> c_output;
|
||||
|
||||
@@ -403,19 +403,19 @@ void Spdz2kMultiplier<K, S>::after_correlation()
|
||||
template<class T>
|
||||
void MascotMultiplier<T>::multiplyForBits()
|
||||
{
|
||||
multiplyForBits(typename T::clear());
|
||||
multiplyForBits(T::clear::characteristic_two);
|
||||
}
|
||||
|
||||
template<class T>
|
||||
template<int X, int L>
|
||||
void MascotMultiplier<T>::multiplyForBits(gfp_<X, L>)
|
||||
template<int>
|
||||
void MascotMultiplier<T>::multiplyForBits(false_type)
|
||||
{
|
||||
throw runtime_error("should not be called");
|
||||
}
|
||||
|
||||
template<class T>
|
||||
template<class U>
|
||||
void MascotMultiplier<T>::multiplyForBits(U)
|
||||
template<int>
|
||||
void MascotMultiplier<T>::multiplyForBits(true_type)
|
||||
{
|
||||
auto& macs = this->macs;
|
||||
auto& outbox = this->outbox;
|
||||
@@ -459,7 +459,7 @@ void MascotMultiplier<T>::multiplyForBits(U)
|
||||
{
|
||||
int128 r = auth_ot_ext.receiverOutputMatrix.squares[j/128].rows[j%128];
|
||||
int128 s = auth_ot_ext.senderOutputMatrices[0].squares[j/128].rows[j%128];
|
||||
macs[0][j] = typename T::clear(r ^ s);
|
||||
macs[0][j] = T::clear::cut(r ^ s);
|
||||
}
|
||||
|
||||
outbox.push(job);
|
||||
|
||||
Reference in New Issue
Block a user