mirror of
https://github.com/data61/MP-SPDZ.git
synced 2026-01-10 05:57:57 -05:00
44 lines
673 B
C++
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_ */
|