Files
MP-SPDZ/Protocols/SPDZ.h
Marcel Keller 32950fe8d4 Maintenance.
2021-11-04 16:24:34 +11:00

44 lines
673 B
C++

/*
* Multiplication.h
*
*/
#ifndef PROTOCOLS_SPDZ_H_
#define PROTOCOLS_SPDZ_H_
#include "Beaver.h"
#include <vector>
using namespace std;
template<class T> class SubProcessor;
template<class T> class Share;
class Player;
/**
* SPDZ protocol
*/
template <class T>
class SPDZ : public Beaver<T>
{
public:
SPDZ(Player& P) : Beaver<T>(P)
{
}
static void assign(typename T::clear& share, const typename T::clear& clear, int my_num)
{
if (my_num == 0)
share = clear;
else
share = 0;
}
int get_n_relevant_players()
{
return this->P.num_players();
}
};
#endif /* PROTOCOLS_SPDZ_H_ */