mirror of
https://github.com/data61/MP-SPDZ.git
synced 2026-01-10 05:57:57 -05:00
54 lines
1.0 KiB
C++
54 lines
1.0 KiB
C++
/*
|
|
* HemiPrep.h
|
|
*
|
|
*/
|
|
|
|
#ifndef PROTOCOLS_HEMIPREP_H_
|
|
#define PROTOCOLS_HEMIPREP_H_
|
|
|
|
#include "ReplicatedPrep.h"
|
|
#include "FHEOffline/Multiplier.h"
|
|
|
|
template<class T> class HemiMatrixPrep;
|
|
|
|
/**
|
|
* Semi-honest triple generation with semi-homomorphic encryption (pairwise)
|
|
*/
|
|
template<class T>
|
|
class HemiPrep : public SemiHonestRingPrep<T>
|
|
{
|
|
typedef typename T::clear::FD FD;
|
|
|
|
friend class HemiMatrixPrep<T>;
|
|
|
|
static PairwiseMachine* pairwise_machine;
|
|
static Lock lock;
|
|
|
|
vector<Multiplier<FD>*> multipliers;
|
|
|
|
SeededPRNG G;
|
|
|
|
map<string, Timer> timers;
|
|
|
|
public:
|
|
static void basic_setup(Player& P);
|
|
static void teardown();
|
|
|
|
static const FHE_PK& get_pk();
|
|
static const FD& get_FTD();
|
|
|
|
HemiPrep(SubProcessor<T>* proc, DataPositions& usage) :
|
|
BufferPrep<T>(usage),
|
|
BitPrep<T>(proc, usage), RingPrep<T>(proc, usage),
|
|
SemiHonestRingPrep<T>(proc, usage)
|
|
{
|
|
}
|
|
~HemiPrep();
|
|
|
|
vector<Multiplier<FD>*>& get_multipliers();
|
|
|
|
void buffer_triples();
|
|
};
|
|
|
|
#endif /* PROTOCOLS_HEMIPREP_H_ */
|