mirror of
https://github.com/data61/MP-SPDZ.git
synced 2026-04-20 03:01:31 -04:00
39 lines
775 B
C++
39 lines
775 B
C++
/*
|
|
* SohoPrep.h
|
|
*
|
|
*/
|
|
|
|
#ifndef PROTOCOLS_SOHOPREP_H_
|
|
#define PROTOCOLS_SOHOPREP_H_
|
|
|
|
/**
|
|
* Semi-honest preprocessing with somewhat homomorphic encryption
|
|
*/
|
|
template<class T>
|
|
class SohoPrep : public SemiHonestRingPrep<T>
|
|
{
|
|
typedef typename T::clear::FD FD;
|
|
|
|
static PartSetup<FD>* setup;
|
|
static Lock lock;
|
|
|
|
public:
|
|
static const bool homomorphic = true;
|
|
|
|
static void basic_setup(Player& P);
|
|
static void teardown();
|
|
|
|
SohoPrep(SubProcessor<T>* proc, DataPositions& usage) :
|
|
BufferPrep<T>(usage),
|
|
BitPrep<T>(proc, usage), RingPrep<T>(proc, usage),
|
|
SemiHonestRingPrep<T>(proc, usage)
|
|
{
|
|
}
|
|
|
|
void buffer_triples();
|
|
void buffer_squares();
|
|
void buffer_bits();
|
|
};
|
|
|
|
#endif /* PROTOCOLS_SOHOPREP_H_ */
|