forked from data61/MP-SPDZ
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathRepPrep.h
51 lines (37 loc) · 1011 Bytes
/
RepPrep.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
/*
* MaliciousRepPrep.h
*
*/
#ifndef GC_REPPREP_H_
#define GC_REPPREP_H_
#include "MaliciousRepSecret.h"
#include "ShiftableTripleBuffer.h"
#include "PersonalPrep.h"
#include "Protocols/ReplicatedPrep.h"
namespace GC
{
template<class T> class ShareThread;
template<class T>
class RepPrep : public PersonalPrep<T>, ShiftableTripleBuffer<T>
{
ReplicatedBase* protocol;
public:
RepPrep(DataPositions& usage, int input_player = PersonalPrep<T>::SECURE);
~RepPrep();
void set_protocol(typename T::Protocol& protocol);
void buffer_triples();
void buffer_bits();
void buffer_squares() { throw not_implemented(); }
void buffer_inverses() { throw not_implemented(); }
void buffer_inputs(int player);
void get(Dtype type, T* data)
{
BufferPrep<T>::get(type, data);
}
array<T, 3> get_triple_no_count(int n_bits)
{
return ShiftableTripleBuffer<T>::get_triple_no_count(n_bits);
}
};
} /* namespace GC */
#endif /* GC_REPPREP_H_ */