mirror of
https://github.com/data61/MP-SPDZ.git
synced 2026-04-20 03:01:31 -04:00
47 lines
960 B
C++
47 lines
960 B
C++
/*
|
|
* MaliciousRepPrep.h
|
|
*
|
|
*/
|
|
|
|
#ifndef PROCESSOR_MALICIOUSREPPREP_H_
|
|
#define PROCESSOR_MALICIOUSREPPREP_H_
|
|
|
|
#include "Data_Files.h"
|
|
#include "ReplicatedPrep.h"
|
|
#include "Auth/MaliciousRepMC.h"
|
|
|
|
#include <array>
|
|
|
|
template<class T>
|
|
class MaliciousRepPrep : public BufferPrep<T>
|
|
{
|
|
typedef BufferPrep<T> super;
|
|
|
|
DataPositions honest_usage;
|
|
ReplicatedPrep<typename T::Honest> honest_prep;
|
|
typename T::Honest::Protocol* replicated;
|
|
typename T::MAC_Check MC;
|
|
|
|
vector<T> masked;
|
|
vector<T> checks;
|
|
vector <typename T::clear> opened;
|
|
|
|
vector<array<T, 3>> check_triples;
|
|
vector<array<T, 2>> check_squares;
|
|
|
|
void clear_tmp();
|
|
|
|
void buffer_triples();
|
|
void buffer_squares();
|
|
void buffer_inverses();
|
|
void buffer_bits();
|
|
|
|
public:
|
|
MaliciousRepPrep(SubProcessor<T>* proc, DataPositions& usage);
|
|
~MaliciousRepPrep();
|
|
|
|
void set_protocol(Beaver<T>& protocol);
|
|
};
|
|
|
|
#endif /* PROCESSOR_MALICIOUSREPPREP_H_ */
|